Skip to content

Instantly share code, notes, and snippets.

@slarwise
Last active October 24, 2020 21:04
Show Gist options
  • Save slarwise/5cceef1c663822b383b59d9392e1890d to your computer and use it in GitHub Desktop.
Save slarwise/5cceef1c663822b383b59d9392e1890d to your computer and use it in GitHub Desktop.
Setup for include-search for erlang in vim
" after/ftplugin/erlang.vim
setlocal suffixesadd=.erl,.hrl
let &l:define = '^-define(\|^-record(\|^-type \|^-type('
let &l:include = '^\s*-include("\zs\f*\ze").$'
setlocal path+=path/to/your/code/**
@slarwise
Copy link
Author

Now all of help include-search is available, as well as gf and similar commands :) Press [D or [<C-D> on a macro, record or type and see what happens!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment