| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hello everyone ! Please help, I'm having a problem with matching. I have some code: open(unit=1, file='file.txt", status='new') #This is an comment (blah blah) close(unit=1) and wish to highlight the insides of the brackets, but only those behind an "open" statement. Does anyone know of any way to do this ? All ideas and suggestions would, of course, be appreciated. Best regards Luka |
|
#2
| |||
| |||
| Luka Djigas <ldigas@remove_this.gmail.com> wrote: > Hello everyone ! > > Please help, I'm having a problem with matching. > I have some code: > > open(unit=1, file='file.txt", status='new') > #This is an comment (blah blah) > close(unit=1) > > and wish to highlight the insides of the brackets, but only those > behind an "open" statement. > > Does anyone know of any way to do this ? > All ideas and suggestions would, of course, be appreciated. One way would be to use the \zs atom, like this: :match StatusLine '\<open\s*(\zs[^)]*' where I used the :match command and the StatusLine group just as an example. See :help /\zs -- Gary Johnson |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.