On Fri, Apr 24, 2009 at 09:10:10PM -0400, Chris O'Regan wrote:
> Useful actions:
> 
> cw - replace a word
> cE - replace text up to next whitespace
> C - replace from cursor to end of line
> cap - replace "A Paragraph"
> cG - replace all lines from the cursor to the end of the file
> c1G - replace all lines from the cursor to the beginning of the file
 
And another:

ci" - replace text inside quotes

I have key mappings for things like that in my vimrc, like:

nmap X ci"

> CTRL-A - add one to the number under the cursor (of course vim can
> handle multi-digit numbers!)
> CTRL-X - subtract one from the number under the cursor

This works for octal and hex too, and there's a plugin to make it work
with dates.

> When in insert mode, CTRL-Y will copy the character immediately above
> the cursor. Very handy if you are entering formatted text that has
> common strings.

There's a funky mapping to enhance this:

imap <C-L> @@@<ESC>hhkywjl?@@@<CR>P/@@@<CR>3s

That makes ctrl-L copy tokens from the line above

-- 
Mark 
http://www.lambic.co.uk

Attachment: signature.asc
Description: Digital signature

_______________________________________________
mlug mailing list
[email protected]
https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca

Reply via email to