Vim Tips Wiki
Register
We recommend that you log in before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your Watchlist. Creating an account is quick and free.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 16: Line 16:
 
<pre>
 
<pre>
 
" rotate_sig.vim
 
" rotate_sig.vim
" Maintainer: Roel Vanhout
+
" Maintainer: Roel Vanhout &lt;roel@2e-systems.com&gt;
 
" Version: 0.1
 
" Version: 0.1
 
" Last Change: Tuesday, June 12, 2001
 
" Last Change: Tuesday, June 12, 2001
 
" Mapping I use:
 
" Mapping I use:
" nnoremap ,r :call RotateSig()<CR>
+
" nnoremap ,r :call RotateSig()&lt;CR&gt;
 
" Usage:
 
" Usage:
 
" -Make sure you delimit your sig with '-- ', or adjust the script
 
" -Make sure you delimit your sig with '-- ', or adjust the script
Line 28: Line 28:
 
" '^-- $' in your mail (nothing bad though - just an not-
 
" '^-- $' in your mail (nothing bad though - just an not-
 
" found marker)
 
" found marker)
  +
 
function! RotateSig()
 
function! RotateSig()
normal! mQG
+
normal! mQG
execute '?^-- $'
+
execute '?^-- $'
execute ':nohl'
+
execute ':nohl'
normal! o<Esc>
+
normal! o&lt;ESC&gt;
normal! dG
+
normal! dG
normal! <CR>
+
normal! &lt;CR&gt;
execute 'r !~/bin/autosig ~/.quotes \%'
+
execute 'r !~/bin/autosig ~/.quotes \%'
normal! `Q
+
normal! `Q
 
endfunction
 
endfunction
 
</pre>
 
</pre>
Line 42: Line 43:
 
==Comments==
 
==Comments==
 
I had an idea that this could be done better and shorter:
 
I had an idea that this could be done better and shorter:
  +
<pre>
 
:nmap ,t mQG:?^-- $<CR>:nohl<CR>o<Esc>dG:r !~/bin/autosig ~/.quotes \%<CR>`Q
+
:nmap ,t mQG:?^-- $&lt;CR&gt;:nohl&lt;CR&gt;o&lt;ESC&gt;dG:r !~/bin/autosig ~/.quotes \%&lt;CR&gt;`Q
</pre>
 
   
 
----
 
----
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)