Add list of taken keybindings

This commit is contained in:
Jean-Claude 2023-10-29 19:52:40 +01:00
parent 6cf147d34f
commit d796aaefef
Signed by: jeanclaude
GPG Key ID: 8A300F57CBB9F63E
1 changed files with 40 additions and 0 deletions

40
vim.md
View File

@ -26,3 +26,43 @@
- Count words: press `g` and `ctrl-g`
- Also works with selections
## LSP
- Show which code action are supported by a language server: `:lua print(vim.inspect(vim.lsp.buf_get_clients()[1].resolved_capabilities))`
## Insert Mode Bindings
> From [here](https://www.reddit.com/r/vim/comments/4w0lib/comment/d63baic/?utm_source=share&utm_medium=web2x&context=3)
I would not remap any of these:
- <C-@> and <C-A>: Repeat last insert (and automatically escape with <C-@>). These are basically the same as <C-R>.. Indispensable once you get used to them.
- <C-D> and <C-T>: Change indent level even if you're not at the beginning of the line. Handy, but I don't use it much.
- <C-E> and <C-Y>: Copy character from below/above the cursor. Sort of useful, not terribly. But not having them would drive me nuts.
- <C-G>: A prefix key. I don't really care about <C-G>u to split the insert into multiple undo levels. Almost no one uses <C-G>j/<C-G>k to start a new insert a line down/up at the same column the current insert started on, but I'm a huge fan. I wouldn't touch this.
- <C-I>: This is literally the same as <Tab>. Don't you dare touch this.
- <C-M>: This is literally the same character you get from hitting Enter. Don't you dare touch this.
- <C-N> and <C-P>: Basic word completion. Extremely useful. I would never touch this.
- <C-O>: Return to insert after a single normal command. You can always just use escape. Has its uses though.
- <C-Q> and <C-S>: Since these are used by terminals for the locking feature, they're unbound in basically every terminal program. That makes them great candidates for screen/tmux prefixes (if you disable the locking feature first). Generally not safe for portable remapping though.
- <C-R>: Like pasting registers from insert mode. This is extremely useful and should not be touched.
- <C-U> and <C-W>: Delete line/word. Extremely useful. Works similar but not exactly the same as in cooked terminal though, which is frustrating...
- <C-V>: Insert literal characters. I use this a lot.
- <C-X>: A prefix to several completion functions. I would say <C-X><C-F> is probably the most indispensable (complete filename), but a lot of them are handy. Read :help i^X to learn about them all.
- <C-[>: This is literally <Esc>. Don't you dare touch it.
I wouldn't mind remapping these:
- <C-B>: This is safe.
- <C-C>: Really escape. I'm not a big fan.
- <C-F>: This is safe.
- <C-H> and <C-?>: These behave the same as backspace, but they aren't literally backspace. I wouldn't mind too much if I lost these.
- <C-J>: Literal newline. Not used too much in its own right. If mappings worked in <C-R> pastes, remapping this would mess up your multiline pastes, but since they don't, it should be safe to remap.
- <C-K>: Digraphs. I don't use them. If you just need occasional characters maybe, like a single Greek character or a way to type an em dash, they're fine. If you try to type in a foreign script using this feature, God help you.
- <C-L>: This is safe.
- <C-Z>: In a terminal, backgrounds Vim, though it shouldn't do that in insert mode.
- <C-\>: This is mostly safe. If you're using <C-O> in mappings, you should probably use <C-\><C-O> instead, so the cursor doesn't shift inconsistently if you're at the end of the line. It's very unlikely I'd use that outside of mappings though.
- <C-]>: Abbreviations. I've never used this.
- <C-^>: Useless in insert mode.
- <C-_>: Toggling reverse insert (if you have some special nondefault settings). Useless for almost everyone.
## Performance
- Show startup time using flag `--startuptime <OUT_FILE>`