2024-06-20 23:49:04 +00:00
|
|
|
|
# Sublime-vim
|
|
|
|
|
|
|
|
|
|
Vim config file: C:\Users\jadonm\AppData\Local\nvim\init.lua
|
|
|
|
|
|
|
|
|
|
== vimwiki ==
|
|
|
|
|
|
|
|
|
|
`[[` - jump to prev header
|
|
|
|
|
`]]` - jump to next header
|
|
|
|
|
`gll` - indent item right
|
|
|
|
|
`glh` - indent item left
|
|
|
|
|
|
2024-11-12 18:13:00 +00:00
|
|
|
|
== vim (NeoVintageous) ==
|
|
|
|
|
|
|
|
|
|
-- Toggle NeoVintageous on/off --
|
|
|
|
|
Install: NeoVintageous Toggle (https://github.com/NeoVintageous/NeoVintageousToggle)
|
|
|
|
|
Add keybinding: { "keys": ["ctrl+alt+t"], "command": "neovintageous_toggle" }
|
|
|
|
|
|
|
|
|
|
Then: `ctrl+alt+t` -> toggle on/off
|
|
|
|
|
|
|
|
|
|
---------------------
|
2024-12-30 14:36:07 +00:00
|
|
|
|
## Selection related stuff:
|
|
|
|
|
`v + i + <bracket_type>`->Select everything inside matching pair of brackets
|
|
|
|
|
|
|
|
|
|
|
2024-11-12 18:13:00 +00:00
|
|
|
|
|
2024-06-20 23:49:04 +00:00
|
|
|
|
|
|
|
|
|
`x` -> cut current selection
|
2024-07-03 23:24:24 +00:00
|
|
|
|
`y` -> copy current selectio
|
2024-06-20 23:49:04 +00:00
|
|
|
|
`p` -> paste
|
|
|
|
|
|
|
|
|
|
`Ctrl + f` - scroll page forward one screen
|
|
|
|
|
`Ctrl + d` - scroll page forward Half screen
|
|
|
|
|
|
|
|
|
|
`Ctrl + b` - scroll page backwards one screen
|
|
|
|
|
`Ctrl + u` - scroll page backwards half screen
|
|
|
|
|
|
|
|
|
|
`Shift + 5` (aka %) - jump to matching bracket
|
|
|
|
|
`v` + `Shift + 5` - select between brackets
|
|
|
|
|
|
|
|
|
|
:%d -> delete every line
|
|
|
|
|
:%y -> yank every line
|
|
|
|
|
:%normal! >> -> indent every line
|
|
|
|
|
|
|
|
|
|
:$ -> Go to end of file
|
|
|
|
|
|
|
|
|
|
`gg` - Go to Top
|
|
|
|
|
|
|
|
|
|
`Shift + g` - Go to bottom
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`<LineNo> + c + G` -> delete from current line to <LineNo> and start insert mode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`c + $` || `C` -> change evrything that comes after the cursor
|
|
|
|
|
`c + c` -> Change this line
|
|
|
|
|
|
|
|
|
|
`f + <char>` -> foward find
|
|
|
|
|
`F + <char>` -> backward find
|
|
|
|
|
|
|
|
|
|
`Ctrl + o` -> Go backward in jump list
|
|
|
|
|
`Ctrl + i` -> Go fwd in jump list
|
|
|
|
|
|
|
|
|
|
`v + F + <char>` -> Select from current cursor position backwards until <char>
|
|
|
|
|
|
2024-06-26 13:48:46 +00:00
|
|
|
|
`Esc + <num> + i + <char> Esc` -> Insert <char> <num> times
|
|
|
|
|
|
2024-07-16 16:01:42 +00:00
|
|
|
|
`:<range_start>,<range_end_optional>co <to_line>` -> Copy range and paste onto line
|
|
|
|
|
`:<range_start>,<range_end_optional>d` -> Delete range
|
2024-06-20 23:49:04 +00:00
|
|
|
|
|
2024-07-16 16:07:19 +00:00
|
|
|
|
`g_` -> Moves cursor to last non-blank character of current line
|
|
|
|
|
* `vg_` -> Select till last non blank character of current line
|
|
|
|
|
|
|
|
|
|
`S(` -> [using Surround plugin] will add () around visual selection
|
2024-06-20 23:49:04 +00:00
|
|
|
|
|
2024-07-16 15:59:48 +00:00
|
|
|
|
new
|
2024-06-20 23:49:04 +00:00
|
|
|
|
|
|
|
|
|
== LSP ==
|
|
|
|
|
Hide/disable diagnostics (verbose lsp)
|
|
|
|
|
|
|
|
|
|
:lua vim.diagnostic.hide() (will only side)
|
|
|
|
|
:lua vim.diagnostic.show() (will only side)
|
|
|
|
|
|
|
|
|
|
:lua vim.diagnostic.disable() (will disable globally)
|
|
|
|
|
:lua vim.diagnostic.enable() (will only side)
|