word completion plugin for the micro editor
This plugin adds a command to execute word completion. User can select a candidate from words collected from active buffer.
After creating this plugin, I noticed that Tab key autocompletes a word not only in command mode but also in a bufpane. (Ctrl-I possibly work as a Tab key and be available as well)
- Move the cursor to the right edge of a half-finished word.
- In command mode (Ctrl-e), enter 'wordCompletion'.
-
- If there is only one candidate, the rest of the word is immediately filled.
- Otherwise, a pane opens at the bottom and shows indexed candidates. Enter one of indexes to choose.
- You can cancel the completion by pressing Esc key or entering any character other than shown indexes.
Put the file at the location as below.
'~/.config/micro/plug/wordCompletion/wordCompletion.lua'
Add a keybinding in '~/.config/micro/bindings.json' as following example.
Example:
{
"~~~~": "~~~~",
"~~~~": "~~~~",
"CtrlSpace": "command:wordCompletion"
}