Quick fix list navigation 2026-03-23 ------------------------------------------------------------------------------- Single list: ]p go to next match in list (:cnext) [p go to previous match in list (:cprevious) :cfirst go to first element in list Multi list: :col go to older quick fix list :cnew go to newer quick fix list Vim replace selection 2025-08-11 ------------------------------------------------------------------------------- When replacing a long string in VIM, instead of typing a long regex, just execute: 1. NORMAL MODE: Select the string you want to replace and hit `*` to search for all the occurences in the file. 2. Init sed and leave the first argument empty. When the first argument is not provided, VIM will take the perviously made selection as the first argument: :%s//REPLACE_TEXT/ 3. Hit ENTER The same applies for deleting lines. After, selection, use: :g//d Yank to register 2025-08-11 ------------------------------------------------------------------------------- Put the words/lines you want to keep for multiple occasions in a register (check wich `:registers`). E.g. if you want to put this and the next 2 lines into register `a`: "ay2j , where: - `"a` init register a - `y2j` yank this and the next 2 lines Then, paste the register anywhere with: "ap , where: - `"a` select register a - `p` paste