(Change <tt> to <code>, perhaps also minor tweak.)
Line 4:
Line 4:
|previous=1110
|previous=1110
|next=1112
|next=1112
−
|created=January 18, 2006
+
|created=2006
|complexity=basic
|complexity=basic
|author=Gert Vierman
|author=Gert Vierman
Line 17:
Line 17:
</pre>
</pre>
−
This overwrites the original mapping of repeating the last <tt>f</tt> or <tt>t</tt> command.
+
This overwrites the original mapping of repeating the last <code>f</code> or <code>t</code> command.
==Comments==
==Comments==
−
You can do the following to regain the functionality of <tt>;</tt>
+
You can do the following to regain the functionality of <code>;</code>
<pre>
<pre>
nnoremap ; :
nnoremap ; :
Line 34:
Line 34:
</pre>
</pre>
−
This takes over the ; even in visual mode (why should I be forced to hold the shift down there but not in normal mode?). Furthermore, sometimes I want to run a custom command that starts with a capital letter, so I might have the shift already held down when I hit the <tt>;</tt> (making it a colon), which would cause problems if the colon were mapped back to the semicolon. I get around this by this mapping:
+
This takes over the ; even in visual mode (why should I be forced to hold the shift down there but not in normal mode?). Furthermore, sometimes I want to run a custom command that starts with a capital letter, so I might have the shift already held down when I hit the <code>;</code> (making it a colon), which would cause problems if the colon were mapped back to the semicolon. I get around this by this mapping:
<pre>
<pre>
noremap ;; ;
noremap ;; ;
Latest revision as of 06:08, July 13, 2012
Please review this tip:
This tip was imported from vim.org and needs general review.
This takes over the ; even in visual mode (why should I be forced to hold the shift down there but not in normal mode?). Furthermore, sometimes I want to run a custom command that starts with a capital letter, so I might have the shift already held down when I hit the ; (making it a colon), which would cause problems if the colon were mapped back to the semicolon. I get around this by this mapping:
noremap ;; ;
So, to get the original ; behaviour, I just hit it twice.
As a rule, I don't get encumbered by the timeout delay caused by the ambiguous mapping because I hit another character immediately after ; when it's a command I'm trying to execute from the command-line. The delay is only a problem if I hit the ; and hit nothing else after it. If I hit ;s, for example (the start of :sp), there is no delay.