vim-erlang-omnicomplete is an Erlang autocompletion plugin for Vim.
Vim's built-in package manager
This is the recommended installation method if you use at least Vim 8 and you don't use another package manager.
Information about Vim's built-in package manager: :help packages.
Installation steps:
- 
Clone this repository (you can replace foowith the directory name of your choice):$ git clone https://github.com/vim-erlang/vim-erlang-omnicomplete.git \ ~/.vim/pack/foo/start/vim-erlang-omnicomplete
- 
Restart Vim. 
- 
Generate help page (replace foowith the same directory name as above)::helptags ~/.vim/pack/foo/start/vim-erlang-omnicomplete/doc
Pathogen
Information about Pathogen: Pathogen repository.
Installation steps:
- 
Clone this repository: $ git clone https://github.com/vim-erlang/vim-erlang-omnicomplete.git \ ~/.vim/bundle/vim-erlang-omnicomplete
- 
Restart Vim. 
- 
Generate help page: :Helptags
Vundle
Information about Vundle: Vundle repository.
Installation steps:
- 
Add vim-erlang-omnicompleteto your plugin list in.vimrcby inserting the line that starts withPlugin:call vundle#begin() [...] Plugin 'vim-erlang/vim-erlang-omnicomplete' [...] call vundle#end()
- 
Restart Vim. 
- 
Run :PluginInstall.
Vim-Plug
Information about Vim-Plug: vim-plug repository.
Installation steps:
- 
Add vim-erlang-omnicompleteto your plugin list in.vimrcby inserting the line that starts withPlug:call plug#begin() [...] Plug 'vim-erlang/vim-erlang-omnicomplete' [...] call plug#end()
- 
Restart Vim. 
- 
Run :PlugInstall.
- 
Open an Erlang source file. 
- 
Start typing something (e.g. liorio:fo).
- 
Without leaving insert mode, hit CTRL-X and then CTRL-O. 
- 
After at most a few seconds, you should see a list of completions. 
- 
Vim's omni completion (i.e., autocomplete) functionality: :help compl-omni.
- 
Vim's completeoptoption to configure omni completion:help completeopt.
- 
vim-erlang-omnicompleteplugin::help vim-erlang-omnicomplete.
This repository contains the following files and directories:
- 
autoload/erlang_complete.erl: Erlang script which can analyse the code base and calculate the list of modules and the list of functions in a module.
- 
autoload/erlang_complete.vim: This script contains most ofvim-erlang-omnicomplete's functionality on the Vim side.This functionality is here (instead of plugin/erlang_omnicomplete.vim) so that Vim's autoload functionality (:help autoload) can make sure that this script is executed only when needed the first time.
- 
doc/vim-erlang-omnicomplete.txt: This file contains the user documentation ofvim-erlang-omnicomplete.
- 
ftplugin/erlang.vim: This script sets upvim-erlang-omnicompletewhen an Erlang source file is opened.
- 
plugin/erlang_omnicomplete.vim: This script sets upvim-erlang-omnicompletewhen Vim is started. It is kept small so that the effect on Vim's startup time is minimal.
- 
Please read the Contributing section of the vim-erlangREADME.
- 
If you modify autoload/erlang_complete.erl, please:- 
update the tests in the vim-erlangrepository
- 
also modify vim-erlang-compiler(if you modify the "load build information" code block)
 
-