diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-04 17:33:06 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-04 17:33:06 +1300 |
commit | 85b05425ed3be65439fefa5f0074d3d7f18217f9 (patch) | |
tree | 6785858b291dcc6bbaddd5b363b28261b37a6401 /vim/plugin | |
parent | Move Vim background detection logic into plugin (diff) | |
download | dotfiles-85b05425ed3be65439fefa5f0074d3d7f18217f9.tar.gz dotfiles-85b05425ed3be65439fefa5f0074d3d7f18217f9.zip |
Don't suggest mappings in Vim plugin comments
Pretty useless, really.
Diffstat (limited to 'vim/plugin')
-rw-r--r-- | vim/plugin/copy_linebreak.vim | 2 | ||||
-rw-r--r-- | vim/plugin/fixed_join.vim | 2 | ||||
-rw-r--r-- | vim/plugin/option_flags.vim | 54 | ||||
-rw-r--r-- | vim/plugin/strip_trailing_whitespace.vim | 2 |
4 files changed, 0 insertions, 60 deletions
diff --git a/vim/plugin/copy_linebreak.vim b/vim/plugin/copy_linebreak.vim index ac21b66d..cba2c866 100644 --- a/vim/plugin/copy_linebreak.vim +++ b/vim/plugin/copy_linebreak.vim @@ -3,7 +3,6 @@ " showbreak characters and breakindent mode on and off, for convenience of " copying multiple lines from terminal emulators. " -" Suggested mapping: <leader>b " if has('eval') @@ -30,7 +29,6 @@ if has('eval') endfunction " Provide mapping proxy to the function just defined - " Suggested mapping: <leader>b noremap <Plug>CopyLinebreak \ :<C-U>call <SID>CopyLinebreak()<CR> endif diff --git a/vim/plugin/fixed_join.vim b/vim/plugin/fixed_join.vim index ef1b03ef..81e61614 100644 --- a/vim/plugin/fixed_join.vim +++ b/vim/plugin/fixed_join.vim @@ -1,6 +1,5 @@ " User-defined key mapping to keep cursor in place when joining lines in " normal mode -" Suggesting mapping: normal J if has('eval') " Declare function @@ -20,7 +19,6 @@ if has('eval') endfunction " Create mapping proxy to the function just defined - " Suggesting mapping: normal J noremap <Plug>FixedJoin \ :<C-U>call <SID>FixedJoin()<CR> endif diff --git a/vim/plugin/option_flags.vim b/vim/plugin/option_flags.vim deleted file mode 100644 index 10739149..00000000 --- a/vim/plugin/option_flags.vim +++ /dev/null @@ -1,54 +0,0 @@ -" -" option_flags.vim: Provide functions to toggle flags in single-char grouped -" options like 'formatoptions', 'shortmess', 'complete' etc. -" -" This will fail hilariously if you try to set e.g. 'switchbuf' with it! -" -" Author: Tom Ryder <tom@sanctum.geek.nz> -" License: Same as Vim itself -" -if has('eval') - - " Public wrapper function to toggle a flag with 'set' - function! option_flags#toggle(option, flag) - call s:toggle(a:option, a:flag, 0) - endfunction - - " Public wrapper function to toggle a flag with 'setlocal' - function! option_flags#toggle_local(option, flag) - call s:toggle(a:option, a:flag, 1) - endfunction - - " Internal function to do the toggling - function! s:toggle(option, flag, local) - - " Check for weird options, we don't want to eval() anything funny - if a:option =~# '[^a-z]' - echoerr 'Illegal option name' - return - endif - - " Weird flags, too; should be a single inoffensive char - if a:flag !~# '^[a-z0-9.]$' - echoerr 'Illegal flag' - return - endif - - " Choose which set command to use - if a:local - let l:set = 'setlocal ' - else - let l:set = 'set ' - endif - - " Use eval() to assign -= or += to l:op for the option toggle - " (I couldn't get {curly braces} indirection to work) - let l:op = '' - execute 'let l:op = &'.a:option.' =~# a:flag ? "-=" : "+="' - - " Use eval() to perform the option toggle and then print the value - execute l:set . ' ' . a:option . l:op . a:flag . ' ' . a:option . '?' - - endfunction - -endif diff --git a/vim/plugin/strip_trailing_whitespace.vim b/vim/plugin/strip_trailing_whitespace.vim index 6a83eb53..36e1d2ad 100644 --- a/vim/plugin/strip_trailing_whitespace.vim +++ b/vim/plugin/strip_trailing_whitespace.vim @@ -1,5 +1,4 @@ " User-defined key mapping to strip trailing whitespace in the whole document -" Suggested mapping: <leader>\x if has('eval') " Define function for stripping whitespace @@ -53,7 +52,6 @@ if has('eval') endfunction " Create mapping proxy to the function just defined - " Suggested mapping: <leader>x noremap <Plug>StripTrailingWhitespace \ :<C-U>call <SID>StripTrailingWhitespace()<CR> endif |