aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-06 11:37:52 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-06 11:37:52 +1300
commit04dcf0c24618ab0c3c2d0ac7dfed3178d409a0e3 (patch)
tree25cb1c263648b3d726d87a52c24430d2881e25e0 /vim/plugin
parentMove pipes from end to start of continued lines (diff)
downloaddotfiles-04dcf0c24618ab0c3c2d0ac7dfed3178d409a0e3.tar.gz
dotfiles-04dcf0c24618ab0c3c2d0ac7dfed3178d409a0e3.zip
Caution about :execute not eval() in VimL comments
May as well refer to the actual command I'm using.
Diffstat (limited to 'vim/plugin')
-rw-r--r--vim/plugin/toggle_option_flag.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/vim/plugin/toggle_option_flag.vim b/vim/plugin/toggle_option_flag.vim
index 2543b8c3..cbe8035e 100644
--- a/vim/plugin/toggle_option_flag.vim
+++ b/vim/plugin/toggle_option_flag.vim
@@ -17,7 +17,7 @@ let g:loaded_toggle_option_flag = 1
" Internal function to do the toggling
function! s:Toggle(option, flag, local)
- " Check for weird options, we don't want to eval() anything funny
+ " Check for weird options, we don't want to :execute anything funny
if a:option =~# '[^a-z]'
echoerr 'Illegal option name'
return
@@ -34,12 +34,12 @@ function! s:Toggle(option, flag, local)
\ ? 'setlocal'
\ : 'set'
- " eval() to assign -= or += to l:op for the option toggle
+ " :execute 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 ? "-=" : "+="'
- " eval() to perform the option toggle and then print the value
+ " :execute to perform the option toggle and then print the value
execute l:set . ' ' . a:option . l:op . a:flag
execute l:set . ' ' . a:option . '?'