Vim Tips Wiki
(minor tweaks)
(Change <tt> to <code>, perhaps also minor tweak.)
 
Line 11: Line 11:
 
|category2=
 
|category2=
 
}}
 
}}
By adding the following line to your <tt>vimrc</tt>, you can use a simple email signature rotator:
+
By adding the following line to your <code>vimrc</code>, you can use a simple email signature rotator:
 
<pre>
 
<pre>
 
map <Leader>ms :e c:\sign.txt<CR>ggV/^-- $<CR>k"*xG$a<C-R><C-O>*<Esc>:w<CR>:bd<CR>G$a<C-M><Esc>"*P
 
map <Leader>ms :e c:\sign.txt<CR>ggV/^-- $<CR>k"*xG$a<C-R><C-O>*<Esc>:w<CR>:bd<CR>G$a<C-M><Esc>"*P
 
</pre>
 
</pre>
   
This rotator expects the user to have a file at the location <tt>C:/sign.txt</tt> with the following information:
+
This rotator expects the user to have a file at the location <code>C:/sign.txt</code> with the following information:
 
<pre>
 
<pre>
 
--
 
--
Line 27: Line 27:
 
</pre>
 
</pre>
   
When a user finishes an email, they may call the shortcut <tt>\ms</tt> and the 'first signature' will be inserted into the email. This will also push the first signature in <tt>C:\sign.txt</tt> to the end of the file. To change to a different signature from the one which is next in the file type <tt>u</tt> and <tt>\ms</tt> again.
+
When a user finishes an email, they may call the shortcut <code>\ms</code> and the 'first signature' will be inserted into the email. This will also push the first signature in <code>C:\sign.txt</code> to the end of the file. To change to a different signature from the one which is next in the file type <code>u</code> and <code>\ms</code> again.
   
The <tt>sign.txt</tt> file must employ a signature separator like the following: '-- '.
+
The <code>sign.txt</code> file must employ a signature separator like the following: '-- '.
   
 
==Comments==
 
==Comments==

Latest revision as of 05:14, 13 July 2012

Tip 106 Printable Monobook Previous Next

created 2001 · complexity basic · author brz · version 6.0


By adding the following line to your vimrc, you can use a simple email signature rotator:

map <Leader>ms :e c:\sign.txt<CR>ggV/^--  $<CR>k"*xG$a<C-R><C-O>*<Esc>:w<CR>:bd<CR>G$a<C-M><Esc>"*P

This rotator expects the user to have a file at the location C:/sign.txt with the following information:

--
first signature
--
second signature
--
third signature
--

When a user finishes an email, they may call the shortcut \ms and the 'first signature' will be inserted into the email. This will also push the first signature in C:\sign.txt to the end of the file. To change to a different signature from the one which is next in the file type u and \ms again.

The sign.txt file must employ a signature separator like the following: '-- '.

Comments[]