Tip #242: The power of "\_" in reg-ex
tip karma |
Rating 19/13, Viewed by 1071
|
created: |
|
May 6, 2002 11:32 |
|
complexity: |
|
intermediate |
author: |
|
vim_power |
|
as of Vim: |
|
6.0 |
One of the most uncelebrated feature of vim 6.0 is the ability to span a search across multiple lines.
\_^ maps a begining of line anywhere in search pattern.
\_$ ---"----- end ----------------------"-------------------------.
\_s ---"------ space ------------"------------------------- .
e.g /{\_s will map all white spaces and new-line chars after a "{"
The \_ can be appended to other objects as well. such as \_U, \_L, \_. (this one's risky) .
See :help pattern for more details.
Njoy
<<"Hide" Folding Markers |
Develop vim modules on Win >>
Additional Notes
|