Basic insert mode completion for the vis editor. Works in insert and replace modes and supports multiple selections.
- line completion:
- mapped to
<C-x><C-l>
- mapped to
- character completion:
- dictionary completion:
- mapped to
<C-x><C-k>
- dictionary must be a new-line separated list of items.
- wl.sh is a helper that reads from stdin and prints a new-line separated list of words/WORDS to stdout
- default dictionary path:
~/.local/share/dict/{syntax}
. - syntaxes names are the same defined by the filetype.lua plugin
- mapped to
- keyword completion:
- mapped to
<C-n>
. Note that this will overwrite standard word completion mapping - this method combine the output of shell commands in the completeopts table.
- the default behaviour is to combine word completion and dictionary completion.
- mapped to
You can set some options from init.lua file or from your visrc.lua:
- the path used to load the plugins
- path to dictionary files - dictionary and keyword completion
- number of lines in vis-menu - line completion
- list of shell commands - used by keyword completion method.
Each script can be instaled separetaly. For example:
mkdir -p ~/.config/vis/plugins
cd ~/.config/vis/plugins
curl -O https://raw.githubusercontent.com/jpaulogg/vis-ins-completion/master/complete-dict.lua
echo 'require("plugins/complete-dict")' >> ../visrc.lua
To install all scripts:
mkdir -p ~/.config/vis/plugins
cd ~/.config/vis/plugins
git clone https://github.com/jpaulogg/vis-ins-completion
echo 'require("plugins/vis-ins-completion")' >> ../visrc.lua