in Vim? I would like to create a mapping for :vsplit . . I tried adding this to .vimrc ... nmap ve...">

How can I display ": vsplit." to <F7> in Vim?

I would like to create a mapping for :vsplit . .

I tried adding this to .vimrc ...

 nmap <F7> verticalsplit . 

However, when I press <F7> , it goes into insert mode and inserts " calsplit .tttt ". (Why "tttt"?)

+4
source share
1 answer

Just put : before this and <CR> after.

 nmap <F7> :vsplit .<CR> 

nmap starts in normal mode, so you should give it exactly what you typed.

You get "tttt" because your mapping was printed v (to switch to visual mode), e (switch to the end of the word), r (switch to replace mode), t (type at and replace anything that is visually selected with t s).

+8
source

All Articles