Skip to content

wettoast4/micro-editor_wordCompletion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

micro-editor_wordCompletion

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)

Usage

  1. Move the cursor to the right edge of a half-finished word.
  2. 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.

Installation

Put the file at the location as below.

'~/.config/micro/plug/wordCompletion/wordCompletion.lua'

Add keybinding (optional)

Add a keybinding in '~/.config/micro/bindings.json' as following example.

Example:

{
    "~~~~": "~~~~",
    "~~~~": "~~~~",
    "CtrlSpace": "command:wordCompletion"
}

About

word completion plugin for the micro editor

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages