Thursday, December 23, 2010

How to keep indent when pasting in gvim?

When pasting something into gvim from a webpage, I almost always prefer
to keep my current indent level for all subsequent lines of a paste that
have 0 indent and add to current level if lines do have indent.

e.g.:

root
child1
child2

my file:

* lxml
|

| is the cursor location. I nearly always want to get this:

* lxml
root
child1
child2

But I can't think of an easy way to do this automatically.. Seems
like this should be the preferred default behaviour in most cases?

-ak

--
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