Tuesday, October 26, 2010

Re: How could I remove one line from current buffer in my vimscript?

On Tue, 26 Oct 2010, Tim Chase wrote:

> [...]
>
> function DelFoo()
> " start on line #1 and search forward
> " for "Foo" (note that this won't find
> " Foo on line #1, but you can preserve
> " 'wrapscan', set it, and start your
> " search from line "$" instead if you
> " want to find it in the first line.
> 1/Foo/d
> endfunction

You could also avoid the line-#1 issue by instead using: 0/Foo/d

--
Best,
Ben

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