Sunday, December 25, 2011

Many maps don't work well the the cursor is on the end of a line

In insert mode, I like emacs-like <Meta-d>, but I found that
imap <M-d> <C-O>de
does not work well then it is on the end of a line.
So does
imap <C-K> <C-G>u<C-O>D

imap <M-d> _<Left><C-O>de
works great, but the screen will blink since we insert a _ into the
text.

Any other advice?


Also, I want to do the Visual-mode swapping (http://vim.wikia.com/wiki/
Swapping_characters,_words_and_lines
)

vnoremap <C-X> <Esc>`.``gvP``P

To use this mapping: first, delete some text (using any normal Vim
command, such as daw, dt, in normal mode, x in visual mode). Then, use
visual mode to select some other text, and press Ctrl-X. The two
pieces of text should then be swapped.

This map doesn't work great when first deleted text are on the end of
text. Neither does the plugin visswap.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment