Edit Page
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 <roel@2e-systems.com> |
" 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() |
+ | " nnoremap ,r :call RotateSig()<CR> |
" 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 |
|
− | + | execute '?^-- $' |
|
− | + | execute ':nohl' |
|
− | + | normal! o<ESC> |
|
− | + | normal! dG |
|
− | + | normal! <CR> |
|
− | + | execute 'r !~/bin/autosig ~/.quotes \%' |
|
− | + | 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:?^-- $ |
+ | :nmap ,t mQG:?^-- $<CR>:nohl<CR>o<ESC>dG:r !~/bin/autosig ~/.quotes \%<CR>`Q |
− | </pre> |
||
---- |
---- |