sponsor Vim development Vim logo Vim Book Ad

InsertChar : Press <tab> to insert a single character

 script karma  Rating 46/14, Downloaded by 1154  Comments, bugs, improvements  Vim wiki

created by
Peter Hodge
script type
Allows you to use <tab> <letter> to insert a single character (no need to press escape). You can also use 3<tab> <letter> to insert 3 characters.

If you install vimscript #2136, then the '.' command will also repeat the last insert.
install details
Step 1:
Place InsertChar.vim in the ~/.vim/plugin/ folder, or ~/.vim/autoload if your prefer.

Step 2:
Set up a mapping in your ~/.vimrc:
nnoremap <TAB> :<C-U>call InsertChar#insert(v:count1)<CR>

You can change <TAB> to any other key you prefer, but the rest of the command must be the same.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
InsertChar.vim 1.0 2009-10-13 7.0 Peter Hodge Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
Vim at Github