New answers tagged

1

To keep things minimal, but still works perfectly for me, I have this, inspired from above : plain highlight until CursorMoved : function! HLNext() let l:higroup = matchend(getline('.'), '\c'.@/, col('.')-1) == col('.') \ ? 'SpellRare' : 'IncSearch' let b:cur_match = matchadd(l:higroup, '\c\%#'.@/, 101) redraw augroup HLNext ...


3

I found that @Wolfie's answer captures unwrapping of a tuple as a keyword and it also had trouble capturing linebroken keyword arguments. Inspired by his regex I came up with the following to put in my python.vim syntax file. (Bear in mind that I'm originally using the python.vim syntax file from sheerun/vim-polyglot) syn match pythonFunctionKeyword "\v\s{-...


2

Line continuation in Ex commands is done by prepending a backslash to the beginning of the continuation lines themselves, not appending it to the end of the preceding lines. See :help line-continuation: Long lines in a :sourced Ex command script file can be split by inserting a line continuation symbol \ (backslash) at the start of the next line. There ...


0

The problem is that the keyword is preventing your regex from matching, since the regex you're using needs to match the whole line, even though you're using \zs to start the capture only at the function name, after the keyword... You can solve that by using a look-behind regex with \@<=, rather than \zs. This seems to work ok: syntax match cCustomFunc /...


0

I added the following function to my emacs.vim: " Inspect Emacs colors with: " M-x describe-face " Inspect Vim colors with: function DescribeFace() let l:s = synID(line('.'), col('.'), 1) let l:r = synIDattr(l:s, 'name') while 1 let l:st = synIDtrans(l:s) if l:s == l:st break endif let l:r .= ' ▷ ' . synIDattr(l:st, 'name') ...


Top 50 recent answers are included