aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * 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
| * \ Merge branch 'release/v0.10.0'v0.10.0Tom Ryder2017-11-0611-52/+72
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * release/v0.10.0: Bump version number to 0.10.0 Correct a comment Use stridx() instead of very-nomagic regex match Use strlen() instead of len() Escape option value assign correctly Extend toggle_option_flag.vim for string flags Rename l:op to l:operation for clarity Separate command building from execution in toggle Use idiomatic VimL regex for param validation Restore some judicious \m\C hedging in Vim Remove redundant has('eval') VimL test Caution about :execute not eval() in VimL comments Move pipes from end to start of continued lines Remove \m\C prefix from inapplicable VimL regexes Don't use VimL ==# for number comparisons Don't overwrite plugin-specified user commands Make background detection return not set value Complete ToggleOptionFlag commands with opt names
| * \ \ Merge branch 'hotfix/v0.9.1'v0.9.1Tom Ryder2017-11-053-4/+4
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hotfix/v0.9.1: Put missing exclamation mark back into shell check Bump version number to 0.9.1 Don't report lines deleted after stripping space
| * \ \ \ Merge branch 'release/v0.9.0'v0.9.0Tom Ryder2017-11-054-25/+61
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * release/v0.9.0: Bump version number to 0.9.0 Move 'formatoptions-a' test near applicable block Precisely define 'formatoptions' 'a' flag presence Restructure 'format' flag logic around vim-tiny Map <leader>j to toggle 'fo'-'j' flag in Vim Use :echoerr not :echomsg for 'fo'-'a' absence Use simpler error message for 'fo'-'a' absence Keep script var cache of 'a' 'fo' flag support Keep script var cache of 'j' 'fo' flag support Lower threshold for 'formatoptions' 'a' flag Block 'formatoptions' 'a' flag on old Vim versions Add 'abort' attribute to autoload function Add vim/autoload to the lint-vim target
| * \ \ \ \ Merge branch 'hotfix/v0.8.1'v0.8.1Tom Ryder2017-11-053-2/+2
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hotfix/v0.8.1: Actually remove the html5 and targets submodules Bump version number to 0.8.1
* | \ \ \ \ \ Merge branch 'release/v0.11.0' into developTom Ryder2017-11-071-2/+2
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | * release/v0.11.0: Bump version number to v0.11.0
| * | | | | | 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
* | | | | | Merge branch 'release/v0.10.0' into developTom Ryder2017-11-061-2/+2
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | * release/v0.10.0: Bump version number to 0.10.0
| * | | | | Bump version number to 0.10.0Tom Ryder2017-11-061-2/+2
|/ / / / /
* | | | | Merge branch 'feature/vim-stridx' into developTom Ryder2017-11-061-10/+11
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feature/vim-stridx: Correct a comment Use stridx() instead of very-nomagic regex match
| * | | | | Correct a commentTom Ryder2017-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This likely got butchered by a wayward search-and-replace.
| * | | | | Use stridx() instead of very-nomagic regex matchTom Ryder2017-11-061-9/+10
|/ / / / / | | | | | | | | | | | | | | | | | | | | I couldn't find this function at first, but it's what I need: a way to check whether a string appears in another one.
* | | | | Merge branch 'feature/vim-plug-review' into developTom Ryder2017-11-0610-50/+69
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feature/vim-plug-review: Use strlen() instead of len() Escape option value assign correctly Extend toggle_option_flag.vim for string flags Rename l:op to l:operation for clarity Separate command building from execution in toggle Use idiomatic VimL regex for param validation Restore some judicious \m\C hedging in Vim Remove redundant has('eval') VimL test Caution about :execute not eval() in VimL comments Move pipes from end to start of continued lines Remove \m\C prefix from inapplicable VimL regexes Don't use VimL ==# for number comparisons Don't overwrite plugin-specified user commands Make background detection return not set value Complete ToggleOptionFlag commands with opt names
| * | | | | Use strlen() instead of len()Tom Ryder2017-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strlen() is older, and also more specific to what we want to do. len() just happens to work on strings, but was introduced for counting Lists and Dictionaries.
| * | | | | Escape option value assign correctlyTom Ryder2017-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This allows e.g.: ':ToggleOptionFlag fillchars diff: '; note the whitespace!
| * | | | | Extend toggle_option_flag.vim for string flagsTom Ryder2017-11-062-16/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit extends toggle_option_flag.vim to allow the exported commands to toggle values of more than one character, for comma-separated options like 'switchbuf', e.g.: :ToggleOptionFlag switchbuf useopen
| * | | | | Rename l:op to l:operation for clarityTom Ryder2017-11-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Just to avoid confusing it with something like l:option.
| * | | | | Separate command building from execution in toggleTom Ryder2017-11-061-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are functionally equivalent; it's just clearer and more editing-friendly to do one thing at a time.
| * | | | | Use idiomatic VimL regex for param validationTom Ryder2017-11-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | \a and \L are, I think, perlre-style VimL regex inventions.
| * | | | | Restore some judicious \m\C hedging in VimTom Ryder2017-11-062-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are technically not really needed, but this is more consistent with good style recommendations in the Google VimScript style guide.
| * | | | | Remove redundant has('eval') VimL testTom Ryder2017-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From what I understand from ":help if", ancient Vim and/or vim-tiny without the 'eval' feature will simply gloss over all commands between :if and :endif without executing them. Therefore as soon as we test a version, we're implicitly excluding everything that doesn't have 'eval' anyway.
| * | | | | Caution about :execute not eval() in VimL commentsTom Ryder2017-11-062-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | May as well refer to the actual command I'm using.
| * | | | | Move pipes from end to start of continued linesTom Ryder2017-11-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Google Vimscript Guide says: <https://google.github.io/styleguide/vimscriptfull.xml#Whitespace> > Place one space after the backslash denoting a line continuation. > > When continuing a multi-line command a pipe can be substituted for > this space as necessary, as follows: > > autocommand BufEnter <buffer> > \ if !empty(s:var) > \| call some#function() > \|else > \| call some#function(s:var) > \|endif
| * | | | | Remove \m\C prefix from inapplicable VimL regexesTom Ryder2017-11-061-2/+2
| | | | | |
| * | | | | Don't use VimL ==# for number comparisonsTom Ryder2017-11-063-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Google VimScript Guide says: <https://google.github.io/styleguide/vimscriptfull.xml#Portability> > Always use case-explicit operators for strings (=~# and =~?, never =~). > > This also applies to !~ == != > >= < and <= > This only applies for strings. == and >= are fine for numbers, but ==# > and >=# must be used for strings.
| * | | | | Don't overwrite plugin-specified user commandsTom Ryder2017-11-062-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Google Vimscript Style Guide says: <https://google.github.io/styleguide/vimscriptguide.xml#Commands> > Excluding [!] prevents your plugin from silently clobbering existing > commands. Command conflicts should be resolved by the user. This makes sense to me as we can think of <Plug> mapping and user commands as being the user-accessible portion of the interface, rather than the functions which can be properly namespaced with autoload#Syntax(), if exposed at all.