Re: share your useful maps

hi everybody,
Would you please share some of your viEmu editing habits and key maps.
Pretty please.


Re: share your useful maps

Good idea. My all time best are these:

  :cnoremap <c-p> <up>
  :cnoremap <c-n> <down>

These allow Ctrl-N and Ctrl-P in command line editing (both when typing a '/' or '?' search or when typing an ':' ex command) to move up and down in the history of previous searches/commands. You can type the starting few characters of a previous command and use these to access only the entries starting with that, so it saves a lot of time for me.


Re: share your useful maps

putting the semicollon in the end of line:
inoremap <c-;> <end>;
is useful for me


Re: share your useful maps

Could you please help me create mapping that will do diw (delete word under cursor) and then paste?

nnoremap <a-p> diwp
does not work. should it?


Re: share your useful maps

Hi kroiz,

I think you're mapping doesn't work because the 'diw' actually yanks to the default register apart from deleting, and then it will paste the same thing back. You need to do it as 'viwp' for it to work (visual mode, inner-word, paste-over).

It should work, but let me know if it does not.




Re: share your useful maps

Works like charm. thanks


Re: share your useful maps

I just took this from my .vimrc, and it works great:

noremap <C-i> i<space><esc>r

Now ctrl-i means "insert a single character". I find this useful very frequently. Less frequently, "append a single character" is useful:

noremap <C-I> a<space><esc>r

-Bill Mill

Last edited by llimllib (2007-05-24 13:16:49)