On 03/15/12 08:43, shawn wilson wrote:
often, i want to indent every line except two or three lines somewhere
in the middle of the selection. so, i have to enter visual select
mode, do what i need, and repeat the process. is there a way to not
select a line in either block or line visual mode?

Visual mode doesn't allow for disjoint selections, but you can target them by regular expressions using :g or :v so you can do something like highlight your range and then issue

  :'<,'>v/pattern_to_find_lines_to_ignore/sil! >

(the "'<,'>" auto-inserts) will indent all the lines in the range that don't match whatever pattern you specify. The "sil!" is there just to prevent the annoying repetition notifying you that "1 line(s) indented". You can use "<" to dedent, or specify any other Ex command you want to issue on each of those lines.

-tim



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

Reply via email to