aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'release/v0.12.0'v0.12.0Tom Ryder2017-11-0819-170/+259
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * release/v0.12.0: Update dotfiles(7) manual from README.md Bump version to 0.12.0 Use "nunmap" not "unmap" for b:undo_* var Remove null command from b:undo_* variables Use consistent/thorough ftplugin/indent unloading Add clustering for POSIX shell syntax groups Add `kill` as shStatement Add `break`, `continue`, `return` as shStatement Override commands and variables for syntax/sh.vim Disable unwanted shell error syntax for any shell Break a long conditional in vim/ftdetect/sh.vim Rename b:check and b:lint with sh_ prefix Remove overkill defined-and-false check of sh vars Clear b:check/lint in ftdetect/sh.vim b:undo Move ftplugin/sh.vim b:undo def to end of file Use correct undo variable name in ftplugin/sh.vim Remove superfluous augroups around ftdetect defs Use sh.vim local vars not global POSIX hacks Spell-checked and corrected README.md
| * Update dotfiles(7) manual from README.mdTom Ryder2017-11-081-31/+30
| |
| * Bump version to 0.12.0Tom Ryder2017-11-081-2/+2
| |
| * Merge branch 'feature/vim-null-co...' into developTom Ryder2017-11-083-10/+10
| |\ | | | | | | | | | | | | | | | * feature/vim-null-command: Use "nunmap" not "unmap" for b:undo_* var Remove null command from b:undo_* variables
| | * 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.
| * Merge branch 'feature/vim-review' into developTom Ryder2017-11-0816-101/+191
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feature/vim-review: Use consistent/thorough ftplugin/indent unloading Add clustering for POSIX shell syntax groups Add `kill` as shStatement Add `break`, `continue`, `return` as shStatement Override commands and variables for syntax/sh.vim Disable unwanted shell error syntax for any shell Break a long conditional in vim/ftdetect/sh.vim Rename b:check and b:lint with sh_ prefix Remove overkill defined-and-false check of sh vars Clear b:check/lint in ftdetect/sh.vim b:undo Move ftplugin/sh.vim b:undo def to end of file Use correct undo variable name in ftplugin/sh.vim Remove superfluous augroups around ftdetect defs Use sh.vim local vars not global POSIX hacks
| | * 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.
| * | Merge branch 'feature/spelling' into developTom Ryder2017-11-081-36/+36
| |\ \ | | |/ | |/| | | | | | | * feature/spelling: Spell-checked and corrected README.md
| | * Spell-checked and corrected README.mdTom Ryder2017-11-071-36/+36
| |/ | | | | | | | | I need to decide whether I'm using NZ or US English. I've made all of this US English for now.
| * Merge branch 'hotfix/v0.11.1' into developTom Ryder2017-11-073-5/+5
| |\ | | | | | | | | | | | | | | | * hotfix/v0.11.1: Bump VERSION Remove asterisks flagging keyword in Vim help
| * \ Merge branch 'release/v0.11.0' into developTom Ryder2017-11-071-2/+2
| |\ \ | | | | | | | | | | | | | | | | * release/v0.11.0: Bump version number to v0.11.0
* | \ \ Merge branch 'hotfix/v0.11.1'v0.11.1Tom Ryder2017-11-073-5/+5
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | * hotfix/v0.11.1: Bump VERSION Remove asterisks flagging keyword in Vim help
| * | | Bump VERSIONTom Ryder2017-11-071-2/+2
| | | |
| * | | 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 'release/v0.11.0'v0.11.0Tom Ryder2017-11-0734-164/+390
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * release/v0.11.0: Bump version number to v0.11.0 Add user_ftplugin.vim and user_indent.vim plugins Bind <Leader>f to show current 'formatoptions' Add leader bindings for date stamping Use b:undo variables correctly Add \p Vim binding to show filetype 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 "do", "then" keywords to Bash completion Break bash/bashrc.d/completion.bash inline lists Use consistent comment layout for Vim plugins Simplify 'formatoptions' config Refactor toggle_option_flag.vim
| * | Bump version number to v0.11.0Tom Ryder2017-11-071-2/+2
| |/
| * Merge branch 'feature/vim-plug' into developTom Ryder2017-11-0727-64/+222
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-0714-47/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * Update <Leader>b mapping to use new mapping nameTom Ryder2017-11-071-1/+1
| | | | | | | | | | | | The name of this mapping was changed in commit 44bd9a8.
| | * Add commands to copy_linebreak.vimTom Ryder2017-11-072-1/+20
| | | | | | | | | | | | | | | | | | Just to be thorough; if +user_commands are available, offer :CopyLinebreakEnable, :CopyLinebreakDisable, and :CopyLinebreakToggle commands.
| | * Give copy_linebreak.vim enable/disable funcs, mapsTom Ryder2017-11-072-26/+44
| | | | | | | | | | | | | | | Add s:CopylinebreakDisable() and s:CopylinebreakEnable functions, and mapping targets for each of them, just to be thorough.
| | * Add :FixedJoin commandTom Ryder2017-11-072-3/+13
| | | | | | | | | | | | | | | This is optiona; if the user's Vim doesn't have the 'user_commands' feature, the command will just quietly not be created.
| | * Add :StripTrailingWhitespace commandTom Ryder2017-11-072-2/+12
| | | | | | | | | | | | | | | This is optional; if the user's Vim doesn't have the 'user_commands' feature, the command will just quietly not be created.
| * | Merge branch 'feature/vim-mappings' into developTom Ryder2017-11-073-0/+19
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | * feature/vim-mappings: Bind <Leader>f to show current 'formatoptions' Add leader bindings for date stamping Add \p Vim binding to show filetype
| | * | Bind <Leader>f to show current 'formatoptions'Tom Ryder2017-11-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | I think this option has become overloaded in recent versions and that these would make more sense and be more manageable as separate but interacting options.
| | * | Add leader bindings for date stampingTom Ryder2017-11-071-0/+9
| | | | | | | | | | | | | | | | \d adds local time, \D adds UTC time.
| | * | Add \p Vim binding to show filetypeTom Ryder2017-11-071-0/+5
| |/ /
| * | Merge branch 'feature/bash-compl' into developTom Ryder2017-11-061-19/+68
| |\| | | | | | | | | | | | | | | | * feature/bash-compl: Add "do", "then" keywords to Bash completion Break bash/bashrc.d/completion.bash inline lists
| | * Add "do", "then" keywords to Bash completionTom Ryder2017-11-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Bash keywords "do" and "then" will be followed by another command. Adding them to this list means that pressing tab after "if foo ; then b" will complete for all command names beginning with "b". I was actually a little surprised that this worked, but there isn't really any reason to be; they're shell words just like everything else, not metasyntactic characters or anything like that.
| | * Break bash/bashrc.d/completion.bash inline listsTom Ryder2017-11-061-19/+66
| |/ | | | | | | | | | | | | Break the sometimes long list of target keywords after the `complete` builtin and its options into newline-separated lists. This should make reading these lists a little easier, and also confuses Vim's syntax highlighting somewhat less.
| * Merge branch 'feature/vim-plug-com' into developTom Ryder2017-11-064-9/+11
| |\ | | | | | | | | | | | | * feature/vim-plug-com: Use consistent comment layout for Vim plugins
| | * Use consistent comment layout for Vim pluginsTom Ryder2017-11-064-9/+11
| |/
| * Merge branch 'feature/vim-togglef...' into developTom Ryder2017-11-062-78/+76
| |\ | | | | | | | | | | | | | | | * feature/vim-toggleflag-helpers: Simplify 'formatoptions' config Refactor toggle_option_flag.vim
| | * Simplify 'formatoptions' configTom Ryder2017-11-061-55/+18
| | | | | | | | | | | | | | | We'll let toggle_option_flags.vim raise the errors, and we won't bother with the version number testing.
| | * Refactor toggle_option_flag.vimTom Ryder2017-11-061-23/+58
| |/ | | | | | | | | | | | | | | | | | | Got carried away and rewrote a lot of this all in one hit. * Show single-line error messages with an s:Error() function * Flag early errors on nonexistent options * Test for the flag both before and after trying to toggle it to use as the basis for error reporting and return value, in a new s:Has() function