Language Features
Code Completion
Onivim will automatically show code completion, when available. Code completion is only available in insert mode.
Completion items are fuzzy-matched, so typing sdn
will select stdin
in the example above.
Keybindings
- Control+n or Down - switch to next completion item.
- Control+p or Up - switch to previous completion item.
- Tab - complete the selected item.
Hover
Hover shows detailed information about a variable or identifier, as well as any diagnostic errors.
Keybindings
- gh normal mode - open hover
- Escape - close open hover
Signature Help
When available, signature help will be automatically opened when typing a trigger character (defined by the extension) - for example, (
.
Go-to Definition
If a definition is available, the identifier will be underlined:
Keybindings
- gd will open the definition location.
Formatting
The =
operator can be used to format, using the best available formatter.
For example:
- gg=G - format entire document
If no formatter is available, Onivim will fall-back to the language-defined indentation rules.
Auto-Closing Pairs
Onivim will automatically insert closing pairs, based on the language configuration settings.
For example, if the language defines (
and )
as closing pairs, typing (
will insert (|)
.
Typing the closing pair will result in the cursor 'passing through'. Pressing Backspace in a closing pair will remove both the opening and closing pair.
Symbol Outline
If the language extension supports it, gO
can be used to navigate to the symbol outline.
In addition, gs
can be used in normal to go-to a specific symbol in the file:!