Started using vim in feburary 2024
One dark pro : https://github.com/olimorris/onedarkpro.nvim
Description : url :
Description : url :
Description : url :
Description : url : https://github.com/williamboman/mason.nvim
Description : url : https://github.com/williamboman/mason-lspconfig.nvim
Description : url : https://github.com/neovim/nvim-lspconfig
p -> Paste from last yank (after cursor)
P -> Paste from last yank (before cursor)
y -> Yank to systemClipboard ("+y)
cp -> Paste from systemClopboard ("+p)
cP -> Paste from systemClopboard ("+P)
dirp -> Paste current dir ("%p)
yyp -> Duplicate line without affecting register in my setup (:co.)
ddp -> Swap line
j -> Swap current line with the one under
k -> Swap currnet ligne with the one above (does not work preperly when at the end of the file)
B -> Enter visual block mode
o -> Close all other windows
gv -> Go to previous selection
-> Alternative file nav
s -> Split vertical
S -> Split horizontal
ciq -> ci" ciq -> ci" diq -> di" yiq -> yi" viq -> vi" caq -> ca" daq -> da" yaq -> ya" vaq -> va"
U -> On selection make UPPERCASE
u -> On selection make lowercase
y -> yand selection
y -> yand selection to system clipboard
c -> change selection
d -> delete selection
i" -> Select everything inside " (Can do with ", ', (, ), {, }, [, ], t) note: t is for tag
a" -> Select everything inside " including (same à i but include the around)
-> Search current word under cursor
0 -> Paste yanked text
" -> Paste from register
always begin with
w -> Make selection forward in current line
b -> Make selection backward in current line
a -> Make selection hint beginin of work everywhere
j -> Make selection start of line under current line
k -> Make selection start of line hover current line
f -> Make selection for char forward in current line (the cursor lend on the char)
F -> Make selection for char backward in current line (the cursor lend on the char)
f -> Make selection for char forward in current line (the cursor lend before the char)
F -> Make selection for char backward in current line (the cursor lend before the char)
s -> Make selection for char in the current file. (the cursor lend on the char)
tt -> New tabs with the current page (:tabnew %) tn -> Next tabs (:tabn) tp -> Previous tabs (:tabp)
q -> Open quick fix list Q -> Close quick fix list n -> Next in quick fix list N -> Previous in quick fix list qf -> First in quick list ql -> Last in quick list
m -> Set Mark ' -> Get Mark m -> Set Global Mark ' -> Get Global Mark
dh -> Open diagnostic in floting window dn -> Naviagte to next diagnostic dN -> Naviagte to previous diagnostic dq -> Put all diagnostic to quickfix list
gd -> Go to definition gD -> Go to declaration h -> Open lsp hover info gi -> Gi to implementation -> signature_help ?? wa -> Add workspace folder wr -> Remove workspace folder wl -> Liast workspace folders oc -> outgoing_calls D -> type_definition rn -> rename ca -> Code actions gr -> references f -> format
ff -> Search by fileName
fg -> Fuzzy find global
fb -> Fuzzy find buffer
fh -> Find in help
fr -> Resume last search
fs -> (find string) Find open telescope searching for word under cusor. Than you can filter by file name
fw -> (find word) Open grep search then output to telescope searching for grep result. Than you can filter by file name fW -> (find WORD) Open grep search then output to telescope searching for grep result. Than you can filter by file name
a -> Harpoon current file to list
d -> Harpoon remove current file to list
1-9 -> Got to x item in list
-> Open list with telescope
-> delete current selected in list (List mode)
u -> Toggle undo tree
gf -> Format entire file
gcc -> comment current line or de-comment
gbc -> Toggle the current line using blockwise comment
gc -> visual mode : Toggles the region using linewise comment
gb -> visual mode : Toggles the region using blockwise comments
ft -> (file tree) Show fileExplorer on left :Neotree filesystem reveal left
H -> while in file explore toggle hidden file
- -> Open current directory to edition un buffer
todo..
j -> override join line under
k -> override join line hover
:lopen -> Open quick fix
:lclose or lcl -> Close quick fix
:lnext -> Go to next item
:lprev -> Go to previous item
:lfirst -> Go to first item
:llast -> Go to last item
:ll -> Go to n item
Rename something multiple time : * on word afer N gn than n to go to next occurence and to . to repeate the gn action
Rename something multiple time : * on word afer N gn than n to go to next occurence and to . to repeate the gn action
Issue with M^ : :set fileformat=unix
Replace but keep a instance of the selection to happend our prepend 1234 -> BSP-1234 :%s/(.*)/BSP-\1
BSP-1234 -> 1234 :%s/(.)-(.)/\2/g