Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add word boundaries to Vim search patterns

This shouldn't be necessary except that the semantic highlighting
performed by luainspect.vim conflicts with the dynamic highlighting
created by my easytags.vim plug-in and this exposes a strange
highlighting bug, where for example in the following:

    local function foobar() end

The 'f' of 'foobar' is highlighted as luaFuncTag while 'oobar' is
highlighted as luaInspectLocalUnused. Note that this bug doesn't
seem to surface unless the two plugins both want to highlight
the same variable...
  • Loading branch information...
commit 59637bd8e2843b51780866f10899f759aa07c416 1 parent 47a223e
Peter Odding authored July 28, 2010

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  luainspect.vim
2  luainspect.vim
@@ -63,7 +63,7 @@ EOF
63 63
   " Highlight variables in buffer based on positions.
64 64
   for fields in split(listing, "\n")
65 65
     let [type, lnum, start, end] = split(fields)
66  
-    let command = 'syntax match %s /\%%%il\%%>%ic.\+\%%<%ic/'
  66
+    let command = 'syntax match %s /\%%%il\%%>%ic\<\w\+\>\%%<%ic/'
67 67
     execute printf(command, type, lnum, start - 1, end + 2)
68 68
   endfor
69 69
 endfunction

0 notes on commit 59637bd

Please sign in to comment.
Something went wrong with that request. Please try again.