The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 12: | Line 12: | ||
|category2= |
|category2= |
||
}} |
}} |
||
− | This command (< |
+ | This command (<tt>PP</tt>) prints lines (like <tt>:p</tt> or <tt>:#</tt>) with the search pattern highlighted. I use <tt>g//p</tt> quite often, and I was missing the highlighting of search pattern. To test this command, try something like: |
<pre> |
<pre> |
||
:g/a/PP |
:g/a/PP |
||
</pre> |
</pre> |
||
− | If you supply the optional argument < |
+ | If you supply the optional argument <tt>#</tt> (<tt>PP #</tt>) then line numbers are also printed. |
<pre> |
<pre> |
||
" command PP: print lines like :p or :# but with with current search pattern highlighted |
" command PP: print lines like :p or :# but with with current search pattern highlighted |
||
Line 62: | Line 62: | ||
</pre> |
</pre> |
||
− | Changes the behaviour of the internal < |
+ | Changes the behaviour of the internal <tt>[I</tt> to highlight the text now. |
I noticed that it breaks on ^ and $ (if they're alone), also, but that doesn't really happen that often. |
I noticed that it breaks on ^ and $ (if they're alone), also, but that doesn't really happen that often. |
||
Line 72: | Line 72: | ||
</pre> |
</pre> |
||
− | Yes, < |
+ | Yes, <tt>[I</tt> with highlighting is a great idea. Now the only thing lacking is the jump numbers at the start of each line that are right-aligned. |
About choking on ^ and $ anchors, it actually poses minor practical problems. Searching for ^ or $ alone is useful to indicate the whole line. In the case for ranges: |
About choking on ^ and $ anchors, it actually poses minor practical problems. Searching for ^ or $ alone is useful to indicate the whole line. In the case for ranges: |