[2008-10-14 05:44 -0700] fritzophrenic wrote:
> On Oct 14, 3:54 am, Teemu Likonen <[EMAIL PROTECTED]> wrote:
>> vipc
>
> Or how about dip instead, saving 2 keystrokes (unless you _want_ to be
> in insert mode after you delete the lines).
We wanted to leave one empty line and "vipc" or "cip" does that; "dip"
deletes all so we would need "O" to open a new line, which in turn puts
us to insert mode too. We have to choose:
vipc
cip
dipO
vipdO
But...
>> map <C-x><C-o> :if getline('.') =~ '^\s*$' <bar>
>> \ execute 'normal! vipc' <bar> endif<CR>
...since we run the normal mode commands with :execute we don't end up
in insert mode.
> Note the use of =~ to match a regular expression, and the use of '\s'
> inside the regular expression to match _any_ whitespace, and not just
> spaces and tabs like some previous patterns.
Apart from spaces and tabs, what are those other whitespaces that \s
matches?
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---