> I'd like to add a level of indent to a region with a single keystroke.
> Here's what I mean:
>
> Let's say I've decided to wrap an existing region in an if statement,
> meaning that region now needs to be indented another 4 spaces. In C I
> could select the region and press = and it's done. The only thing I've
> figured out in Python is to select the region and do
>
> :'<,'>s/^/ /
>
> Now that's not the worst thing in the world, and I suppose I could do my
> own key mapping for it, but I can't be the first person who has wanted
> to do something like that, and I wonder if there is a keystroke already
> designed for that?
>
Also, if it's a paragraph (surrounded by blank lines), a very handy
command is to do: <ap or >ap; if you want to indent from cursor to
end or beginning of paragraph, do one of <}, <{, >}, >{. -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