Le dimanche 5 février 2017 19:24:17 UTC+1, Marcus Martinez a écrit :
> Hello,
>
> I am using Vim version 7.4.160 on AIX.
>
> I opened my text file...
> vim foo.txt
>
> ...and modified the first ten lines using Sed substitution...
> :1,10 s/^/--/
>
> After running this command the beginning of lines 1 through 10 do have the "--" correctly placed. However, the first character of each line in the file is now highlighted (as shown in the attached image). The pattern now recurs for any text file I open with vim.
>
> Why does this happen? How can I "undo" this new pattern so that vim does not highlight the first character of each line?
>
> Thanks,
> Marcus Martinez
Hi,
Since version 7.4.083, it is also possible to use keeppatterns.
:keeppatterns 1,10 s/^/--/
Using it, you will not change your search history.
Eric
--
--
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
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment