Editing keybindings
Expression
-
expr = true-
This allows the function return to be interpreted correctly as a command in Neovim.
-
Recursive and Non-Recursive
-
remapis an option that makes mappings work recursively. By default, it is on and I'd recommend you leave it that way. The rest are mapping commands , described below: -
:mapand:noremapare recursive and non-recursive versions of the various mapping commands. For example, if we run::map j gg (moves the cursor to the first line) :map Q j (moves the cursor to the first line) :noremap W j (moves the cursor down one line) -
Then:
-
jwill be mapped togg. -
Qwill also be mapped togg, becausejwill be expanded for the recursive mapping. -
Wwill be mapped toj(and not togg) becausejwill not be expanded for the non-recursive mapping.
-
-
For each of these sets of mappings, there is a mapping that works in normal, visual, select and operator modes (
:mapand:noremap), one that works in normal mode (:nmapand:nnoremap), one in visual mode (:xmapand:xnoremap) and so on. -
Mode letters:
-
n: normal only -
v: visual and select -
o: operator-pending -
x: visual only -
s: select only -
i: insert -
c: command-line -
l: insert, command-line, regexp-search (and others. Collectively called "Lang-Arg" pseudo-mode)
-
Remove keybinds
-
You can't
unmapinternal keybindings that vim needs but you can map them to<Nop>to disable them.-
<Nop>is 'no operation'. It's a way to disable behavior.
-
-
"Try adding
vim.keymap.del("n", "<leader>L")toconfig/keymaps.lua".-
Maybe this only works with keybindings that are not internal.
-
-
Remove all default keybindings .
-
"Right now the solution is to map the items you want mapped and let them override the defaults, and any remaining defaults that you don't want to have you can map to
"none""
-
See shortcuts
-
:map-
Only shows user or plugin remaps.
-
:nmapfor normal mode mappings -
:vmapfor visual mode mappings -
:imapfor insert mode mappings
-
-
:Telescope keymaps-
Only shows user or plugin remaps.
-
-
Keyseer .
-
:KeySeer
-
Open NVim
-
nvim .
-
opens nvim in the current directory, showing a list of folders
-
by default, the file structure is shown with NetRW, a file manager from nvim
-
-
nvim file_name.lua
-
opens the given file in nvim
-
Help
-
:help -
:Tutor-
I did the whole Tutor.
-
Commands
-
:
-
nvim command
-
-
:!
-
external commands
-
-
@:
-
repeat last ex command
-
-
@@
-
after repeating it once, you can continue repeating with this
-
-
ctrl d
-
while typing a command, ctrl d will show a list of commands that completes the one you're typing
-
use tab to scroll through the completions
-
Terminal
-
Curuiz.
-
Feels like it only makes sense for macros, or something like that.