Tip #270: Insert a single character
tip karma |
Rating 37/33, Viewed by 2170
|
created: |
|
June 29, 2002 5:38 |
|
complexity: |
|
basic |
author: |
|
Mikko Pulkkinen |
|
as of Vim: |
|
5.7 |
Using Insert mode to insert a single character feels clumsy (you need
3 keypresses for one character), so here's a slightly easier way:
:nmap <space> i_<esc>r
Now, when in Normal mode, just press space followed by what
it is you want to insert.
BUG: Repeating the insertion with . doesn't work.
<<Syntax highlighting is "out of sync", seems to correct itself with refresh ?? |
easy (un)commenting out of source code >>
Additional Notes
|