aboutsummaryrefslogtreecommitdiff
path: root/vim
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'feature/vim-mutt-plug' into developTom Ryder2017-11-113-0/+76
|\ | | | | | | | | | | | | * feature/vim-mutt-plug: Move mutt_mail.vim line select logic into plugin Add new mail_mutt.vim plugin, apply mappings Beginnings of a buffer-to-Mutt mailer plugin
| * Move mutt_mail.vim line select logic into pluginTom Ryder2017-11-112-10/+19
| | | | | | | | This makes the configuration shorter and easier to read.
| * Add new mail_mutt.vim plugin, apply mappingsTom Ryder2017-11-113-8/+65
| | | | | | | | | | This plugin provides a shortcut for staring email messages in Mutt with a range of lines.
| * Beginnings of a buffer-to-Mutt mailer pluginTom Ryder2017-11-081-0/+10
| |
* | Sort 'shortmess' flag settings alphabeticallyTom Ryder2017-11-101-6/+6
| |
* | Add 'o' and 'O' back into 'shortmess'Tom Ryder2017-11-101-0/+4
| | | | | | | | | | | | | | These flags prevent multiple messages from reading or writing multiple files from queuing up and forcing an enter prompt. They're part of the default, which is why I didn't notice their absence until I tried using the setting previous to this commit and opened two files at once.
* | Set up individual flags for 'shortmess'Tom Ryder2017-11-101-2/+23
| | | | | | | | | | Most of these are actually the default; may as well explicitly set and document them, however. t and T in particular are new.
* | Use exists+ test rather than exists&Tom Ryder2017-11-105-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From :help hidden-options: >Not all options are supported in all versions. This depends on the >supported features and sometimes on the system. A remark about this is >in curly braces below. When an option is not supported it may still be >set without getting an error, this is called a hidden option. You can't >get the value of a hidden option though, it is not stored. > >To test if option "foo" can be used with ":set" use something like this: > if exists('&foo') >This also returns true for a hidden option. To test if option "foo" is >really supported use something like this: > if exists('+foo')
* | Adjust some whitespace and comment layoutTom Ryder2017-11-107-3/+12
| |
* | Move matchit.vim sourcing into plugin.vimTom Ryder2017-11-102-4/+4
| |
* | Rename netrw.vim to plugin.vimTom Ryder2017-11-101-0/+0
| | | | | | | | For plugin-specific configuration.
* | Remove 'shellslash' settingTom Ryder2017-11-101-6/+0
| | | | | | | | | | This will allow the Windows-specific stuff in my new auto_* plugins to quote filenames correctly.
* | Move fedora.vim into os.vimTom Ryder2017-11-101-0/+0
| | | | | | | | For OS-dependent config.
* | Remove 'tildeop' settingTom Ryder2017-11-101-3/+0
| | | | | | | | I never use it. May as well defer to the vi default.
* | Rearrange three smaller files into display.vimTom Ryder2017-11-105-18/+20
| |
* | Move 'paste' options into terminal.vimTom Ryder2017-11-102-6/+7
| | | | | | | | 'paste' is specific to the terminal only anyway.
* | Move wildmenu config into completion.vimTom Ryder2017-11-102-23/+24
| |
* | Rename complete.vim to completion.vimTom Ryder2017-11-101-0/+0
| | | | | | | | Clearer filename and more consistent to use the noun.
* | Rename term.vim to terminal.vimTom Ryder2017-11-101-0/+0
| | | | | | | | A little clearer and a needless abbreviation anyway.
* | Rename yank.vim to registers.vimTom Ryder2017-11-101-0/+0
| | | | | | | | More likely to share options this way.
* | Move nrformats.vim content to format.vimTom Ryder2017-11-102-3/+4
| |
* | Rename startup.vim to messages.vimTom Ryder2017-11-101-0/+0
| | | | | | | | | | More accurate given the content, and more likely to have other options set in it.
* | Merge encoding.vim and file.vim into files.vimTom Ryder2017-11-102-4/+5
| |
* | Move backup, swap, and undo dir logic into pluginsTom Ryder2017-11-109-71/+235
| |
* | Merge join,indent.vim into whitespace.vimTom Ryder2017-11-103-31/+33
| |
* | Append angle brackets rather than resetting optTom Ryder2017-11-101-1/+1
| |
* | Remove setting for 'tabstop'Tom Ryder2017-11-101-3/+0
| | | | | | | | | | | | | | | | | | | | | | :help 'tabstop' says that setting it may be a bad idea: > Note: Setting 'tabstop' to any other value than 8 can make your file > appear wrong in many places (e.g., when printing it). On thinking about it, it's actually probably better to show literal tabs as eight screen spaces, as it will make it very obvious when there are tabs in the file.
* | Remove false error flagging for sh char class globTom Ryder2017-11-091-0/+5
| | | | | | | | | | | | The syntax highlighter flags this code with an error on the final square bracket: `case $foo in [![:ascii:]]) ;; esac`, but that's all legal. I'm not yet sure how to fix it, so will just turn the error group for now.
* | Fix 'while'/'until' highlighting in syntax/sh.vimTom Ryder2017-11-091-0/+14
| | | | | | | | | | | | | | These two changes coax syntax/sh.vim into realising that POSIX shell does not specify 'until' as a builtin (that's a Bash/Ksh thing), and that POSIX shell is able to nest 'while' loops within other blocks (that's not a Bash/Ksh thing).
* | Correct prefix for b:undo_* variableTom Ryder2017-11-081-1/+1
|/ | | | This was causing nasty errors whenever I started editing a Perl file.
* Use "nunmap" not "unmap" for b:undo_* varTom Ryder2017-11-082-5/+5
| | | | We only want to remove the normal mode mapping, since that's all we set.
* Remove null command from b:undo_* variablesTom Ryder2017-11-083-6/+6
| | | | | I didn't realise that a null command at the front of .e.g '|cmd|cmd2' printed the current line! Removed that.
* Use consistent/thorough ftplugin/indent unloadingTom Ryder2017-11-0810-13/+40
| | | | Unload all maps too, with silent! in case they don't exist.
* Add clustering for POSIX shell syntax groupsTom Ryder2017-11-081-0/+3
| | | | | | This is what was missing after I initially redefined these groups and stopped all POSIX shell scripts thinking they were POSIX. The words now highlight correctly when within control structures again.
* Add `kill` as shStatementTom Ryder2017-11-081-0/+1
| | | | | It's not a shell builtin in `dash`, but it is in `Bash`, and I kind of think of it that way.
* Add `break`, `continue`, `return` as shStatementTom Ryder2017-11-081-1/+5
|
* Override commands and variables for syntax/sh.vimTom Ryder2017-11-081-0/+76
| | | | | | | | | | The defaults for these groups don't make much sense to me, so I completely reset them. This isn't quite complete yet; for some reason as soon as e.g. an IFS= setting is contained in e.g. an "if" or "while" block, they don't highlight correctly anymore. There's probably some other part of the core syntax/sh.vim file I need to include here.
* Disable unwanted shell error syntax for any shellTom Ryder2017-11-081-12/+7
|
* Break a long conditional in vim/ftdetect/sh.vimTom Ryder2017-11-081-1/+2
| | | | Just for legibility.
* Rename b:check and b:lint with sh_ prefixTom Ryder2017-11-081-9/+9
| | | | | Just to reduce the chance of colliding with existing buffer variable names.
* Remove overkill defined-and-false check of sh varsTom Ryder2017-11-081-4/+4
| | | | | | syntax/sh.vim only uses the existence of these variables for its checks and as far as I can see never their actual values, so let's not overdo things.
* Clear b:check/lint in ftdetect/sh.vim b:undoTom Ryder2017-11-081-1/+1
|
* Move ftplugin/sh.vim b:undo def to end of fileTom Ryder2017-11-081-2/+4
|
* Use correct undo variable name in ftplugin/sh.vimTom Ryder2017-11-081-1/+1
| | | | This was likely a copy-paste error.
* Remove superfluous augroups around ftdetect defsTom Ryder2017-11-085-43/+27
| | | | | | | | | | From :help ftdetect, item 2: > 2. Create a file that contains an autocommand to detect the file type. > Example: > au BufRead,BufNewFile *.mine set filetype=mine > Note that there is no "augroup" command, this has already been done > when sourcing your file.
* Use sh.vim local vars not global POSIX hacksTom Ryder2017-11-082-26/+23
| | | | | | | | | | | | | | | | | | | Rather than setting g:is_posix and working around core syntax/sh.vim's ideas about Korn and POSIX shells, forego sh.vim's efforts to guess what shell the system /bin/sh is entirely. It's irrelevant to me anyway, since I'll often be writing shell scripts to run on an entirely different system. Instead, if we have a #!/bin/sh shebang reflected in the b:is_sh variable set by core filetype.vim, and we don't have any other buffer-level indication of what shell this is, assume it's POSIX, because I very rarely write Bourne. Then, after the syntax file is loaded, clear away all but one of the resulting b:is_* variables. I have a feeling this is going to end with me re-implementing this syntax file, possibly as separate sh.vim, bash.vim, and ksh.vim files.
* Remove asterisks flagging keyword in Vim helpTom Ryder2017-11-072-3/+3
| | | | | | I didn't realise that using asterisks for emphasis in VimL documentation in the middle of a paragraph counted as a help tag. This was causing a call to `:helptags ~/.vim/doc` to error out.
* Merge branch 'feature/vim-plug' into developTom Ryder2017-11-0726-64/+220
|\ | | | | | | | | | | | | | | | | | | | | * feature/vim-plug: Add user_ftplugin.vim and user_indent.vim plugins Use b:undo variables correctly Update <Leader>b mapping to use new mapping name Add commands to copy_linebreak.vim Give copy_linebreak.vim enable/disable funcs, maps Add :FixedJoin command Add :StripTrailingWhitespace command
| * Add user_ftplugin.vim and user_indent.vim pluginsTom Ryder2017-11-0713-47/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 09b83b6 and replaces it with a working version. Because of the order in which the autocmd hooks run, the attempted method of adding unloading instructions for my custom ftplugin and indent rules to the b:undo_ftplugin and b:undo_indent doesn't actually work. This is because the custom rules for both groups from ~/.vim are sourced *first*, before their core versions, so the changes the custom rules made to b:undo_ftplugin and b:undo_indent are simply clobbered by the core version when it loads itself. Therefore we need to arrange for two things: 1. A custom variable needs to be checked and executed when the filetype changes to revert the changes for the custom ftplugin or indent rules. 2. That execution needs to take place *first* when the filetype changes. I wrote two simple plugins with very similar code that are designed to run as a user's custom ftplugin.vim and indent.vim implementations, running before their brethren in the Vim core, and setting up an autocmd hook to :execute b:undo_user_ftplugin and b:undo_user_indent plugin respectively. This seemed to work well, so I've implemented it. It involves adding a shim to ~/.vim/indent.vim and ~/.vim/ftplugin.vim to "preload" the plugin when the `filetype indent plugin on` call is made. I've added that to the relevant Makefile targets.
| * Use b:undo variables correctlyTom Ryder2017-11-0713-32/+57
| | | | | | | | | | | | | | | | | | | | | | Setting or adding to b:undo_indent and b:undo_ftplugin variables, which I only learned about just now, allows me to avoid the _GLOBAL.vim hack and remove some files from both vim/indent/ and vim/ftplugin/. These variables aren't subjected to :execute automatically in anything older than Vim 7.0, but I don't think that's too much of a concern as the only real reason they're needed are for changing filetypes in the same buffer, which doesn't happen that often anyway.