···11+latest are in obsidian://open?vault=SecondBrain&file=%F0%9F%92%A1%20Resources%2F%F0%9F%8C%8D%20Wiki%20%F0%9F%93%82%20Files%2F%F0%9F%90%A7%20Linux%2FVim%20%26%20Tmux%2FVim%20and%20Tmux%20Shortcuts
22+1324# learning VIM
3544-55-66commands I learned and useful
77-8798zz -> centers your cursor to the middle
109; -> if you search something with f or t, it will search for the next one
···2827t -> find to a character. with ; next. With T you find backward
29283029## More Navigation
3030+3131^U: move up half a screen
3232^D: move down half a screen
3333L: puts cursor into lowest part of your code
···3939J: join the current line with the next one (delete what's between)
40404141## Do even more Navigation
4242+4243ctrl+p: fuzzy finding for files
4344:e open a new file
4444-ctrl+ˆ: toggle between two open files
4545+ctrl+ˆ: toggle between two open files
4646+4547### local marks
4848+4649m-any-key: set a marker on that key. with '-any-key you can jump back to that marker. you can set multiple markers
4747- useful when you work in a file for long!
5050+ useful when you work in a file for long!
5151+4852### global marks
5353+4954same as local also set with m, but this time the any key will be capitalized
5555+5056### buffer operation
5757+5158c-^ switching between latest two files in buffer
5259:b starting-file-name <tab> will serach your buffer and let you switch between files
5360:bd closes/deletes current buffer (will not delete when you saved, it just unloads from buffer)
6161+5462## window operations
6363+5564ctrl+w: entering window mode
5665then:
5766v: vertical split
···6271:Ex opens the file-three
63726473## visual mode
7474+6575v -> visual mode (characters)
6676V -> line mode
6777ctrl + v -> column mode!
6878ctrl+v and any command after hit ESC -> will do it on all selected lines of columns
69797080## recording macros
7171-q -> record macros! after you need to say where to save. e.g. safe on a character. you can applay it with @ and that character. hit q to stop/save the recording.
72818282+q -> record macros! after you need to say where to save. e.g. safe on a character. you can applay it with @ and that character. hit q to stop/save the recording.
73837484. -> redo any cmd you did before !!
75857686## text-objects or nouns
8787+7788p -> change paragraph
7889w -> word
7990s -> sentense
80918181-[ ( { < -> A [], (), or {} block
9292+[ ( { < -> A [], (), or {} block
8293t -> tag
8394b -> block B-> block in
8495R -> Insert mode -> replaces existing text
8596r -> replace one character
86978798# Learnings
9999+88100Ctrl+r" - Insert the contents of the " register, aka the last yank/delete. e.g. if you want to replace single quotes with double: ciw'Ctrl+r"'