Erlang autocompletion in vim

To enable erlang autocompletion in vim, you'll need to get a dictionary with the Erlang keywords first. There's a file available at: erlang.dict.

Save erlang.dict to the folder ~/.vim/dict (or any folder you wish, just keep it consistent... create if necessary).

Then add to ~/.vim/after/ftplugin/erlang.vim (create if necessary):

setlocal softtabstop=2
setlocal shiftwidth=2
setlocal tabstop=2

setlocal iskeyword+=:
setlocal complete=.,w,b,u,t,i,k
setlocal dictionary=~/.vim/dict/erlang.dict

setlocal makeprg=erlc\ %

That's it.

Now type lists:, press <Ctrl> + p in edit mode (of an erlang file of course) and you should see the autocompletion.

How to contribute

One of the easiest ways to contribute is to participate in discussions. You can also contribute by submitting pull requests.

General feedback and discussions?

Do you have questions or feedback on this article? Please create an issue on the GitHub issue tracker.

Something is wrong or missing?

There may be something wrong or missing in this article. If you want to help fixing it, then please make a Pull Request to this file on GitHub.