]> oss.titaniummirror.com Git - smckown/dotfiles.git/commitdiff
Have all coX commands report actual command used
authorR. Steve McKown <rsmckown@gmail.com>
Tue, 9 Feb 2016 15:48:37 +0000 (08:48 -0700)
committerR. Steve McKown <rsmckown@gmail.com>
Tue, 9 Feb 2016 15:48:37 +0000 (08:48 -0700)
Locally defined coa and cot should work like their counterparts in
unimpaired.vim, where the actual command is echoed on the status line
rather than a human readable description of what happened.  This is
great for consistency but also good for informing the user what these
commands actuall do.

vim/vimrc

index 6ad73bf8d7f73f8b5ab263310f181819ebcc8a35..ab4b160229d06d0d29f1244438cd0bfdaf3aa039 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -372,10 +372,10 @@ function! ToggleFormatOptionT()
   let tmp = substitute(&formatoptions, 't', '', '')
   if &formatoptions == tmp
     set fo+=t
-    :echo "Enable text wrap"
+    :echo ":set fo+=t"
   else
     set fo-=t
-    :echo "Disable text wrap"
+    :echo ":set fo-=t"
   endif
 endfunction
 
@@ -385,10 +385,10 @@ function! ToggleFormatOptionA()
   let tmp = substitute(&formatoptions, 'a', '', '')
   if &formatoptions == tmp
     set fo+=a
-    :echo "Enable auto-wrap paragraphs"
+    :echo ":set fo+=a"
   else
     set fo-=a
-    :echo "Disable auto-wrap paragraphs"
+    :echo ":set fo-=a"
   endif
 endfunction