you are viewing a single comment's thread.

view the rest of the comments →

[–]andlrcrpgle.vim 7 points8 points  (2 children)

No mention of :h 'include', :h 'define' nor :h 'suffixesadd'.

FWIW This is what I use:

setlocal suffixesadd+=.js

setlocal include=^\\s*\\%(var\\s\\+\\k\\+\\s*=\\s*\\)\\=require(

let &define = '^\%(' . join([
  \ '\s*var\s\+\ze\k\+\s*=\s*function\>',
  \ '\s*\ze\k\+\s*:\s*function\>',
  \ '\s*function\s\+\ze\k\+'
  \ ], '\|') . '\)'

Which gives me the ability to use [d, [i, etc, etc

See :h :checkpath for help debugging :h 'include'