drlatex <n_dattani@hotmail.com> wrote:
>
>
> Hello there vimmers,
>
> I was wondering if I could remove everything in a file up to AND
> including a certain word within the file.
>
> Let's say I have something like ".......hello word123"
>
> And I want only 123 to remain.
>
> Is there a way to delete everything up to and including the string
> "hello word" ??
>
> I know that this particular string only comes up once in the file.
My first thought: try searching for "hello word" (/hello word), then
skipping over it (9l), entering visual mode (v), going to the start of
the file (gg), and finally deleting your selection (d). I'm sure there
are more elegant ways to do it, though, and I'm curious to find them
out, as well.
Vlad
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment