This is an alphabetical list of vim plugins that I use.

## Alternate

In C or C++ projects, source and header files often come in pairs. For example, there's utils.c and utils.h and you often need to edit both files at the same time. With Alternate, you can type the :A command and it will quickly switch between .c and .h files. If you're in a .c file, it will switch to the .h file, and if you're in a .h file, it will switch to the .c file.

## Asterisk

There are two operators to search for the word under the cursor. They are * (search forward) and # (search backward). Unfortunately, in visual mode, they don't search for the visual selection and you can't search for a word with special characters in it. For example, if the word is h#e#l#l#o, then these operators will pick and search one of the letters in this word and that's not what you want.

With this plugin, you can search the visually selected sequence and it can contain any special characters. Use the v command to make a selection and then press * or # to search.

Additionally, this plugin keeps the cursor position across matches. For example, if the cursor is on the letter d of the word index, then after pressing *, the cursor will jump to the letter d of the next index match. Without this plugin, vim would jump to the first letter of the next match.

## Bufexplorer

To work efficiently with multiple files, you need to use several different commands, such as :ls (list buffers), :b (edit a buffer), :bn (next buffer), and :bp (previous buffer). Usually, however, you spend most of your time just typing :bn, :bn, :bn, until you find the right file.

Bufexplorer makes working with multiple files in vim a breeze. It adds the \be key binding (\ is the leader key) that opens a list of all buffers and it lets you quickly switch to another buffer by moving to the line that shows the filename and pressing enter.

## Bufferize

Many vim commands are inherited from vi and their output is very primitive. They print the output to the screen and you can't search or copy. If you press the space one too many times, the content disappears. It's nearly impossible to search this text and sometimes you don't even know how to make vim display it again.

Bufferize solves this problem. It takes a vim command and creates a temporary buffer from its output and opens it in a split window. For example, :Bufferize map will show all keyboard mappings in a new window and you can search them. To exit the new window, just use the regular :q command.

## Bufferline

Bufferline complements Bufexplorer (above) and makes it even easier to work with multiple files/buffers. It prints a list of all open files together with their buffer numbers in the status line. You can just glance at this list and type :b 5 to switch to the 5th file/buffer or use Bufexporer and hit \be followed by /5 and enter.

## Bufkill

If you have two buffers open in a split and you want to close a buffer, you can use the :bd command. Unfortunately, this command also closes the split. Often, you don't want to close the split and want to just close the buffer. In this case, use Buffkill's :BD command, which will close the buffer but leave the split open.

## Characterize

Characterize adds the ga shortcut that shows the name of the Unicode character under the cursor, its code point value, and hex value.

## Clever-f

This extension improves the f and F shortcuts that are used to find the next/previous character. Pressing fa will go to the next letter a. Pressing Fa will go to the previous a. Without this extension, you have to either type fa again to find the next a or press the semicolon ;. Similarly, you have to type Fa or , to find the previous a again. If you're a seasoned vimmer, you're already using ; and , for something else so you end up doing fafafafa or FaFaFaFa.

With this extension, you can just press f again and it will search the next a character, and you can press F again and it will search the previous a. So, instead of doing fafafafa, you can now do fafff and instead of FaFaFaFa, you can do FaFFF. Also, when you press f or F, it will illuminate the next/previous matches to that you instantly know where the cursor will jump.

## Colorscheme-gruvbox

A dark color scheme that I like. Gray background, light green text and functions.

## Colorscheme-jellybeans

Another dark color scheme that I like. Black background, light green text, light yellow functions.

## Colorscheme-seoul256

Another dark color scheme that I like. Gray background, light blue text, light yellow functions.

## Commentary

One of the simplest and quickest commenting plugins. Press gcc to comment out the entire line. Press gc to comment out a visual selection. Press the same shortcuts again to uncomment.

## Conflicted

This plugin helps resolving git merge conflicts. Let's say you just pulled code from the project's master branch on github and you got a merge conflict error. To resolve it, you can run the :Conflicted command that this plugin offers. This command creates a three-way diff and puts the results in three vertical split windows. The left split is upstream changes, the middle split is working changes, and the right split is local changes. You can either accept upstream diff or the local diff to resolve the conflict. Conflicted offers two key mappings for quickly accepting the right diff. The dgu command will use the upstream diff and dgl will use the local diff. To resolve the next conflict, use the :GitNextConflict command. If there are no more conflicts, vim will exit, and you can git commit the resolved files.

## Ctrlp

This plugin adds the ctrl+p binding that opens a fuzzy file open dialog. For example, if you need to edit math-config.json file, then you can just type some of the letters of filename like mat.js, mjson, or even thfig (letters "th" are last two letters of "math" and "fig" are last three letters of "config"). Ctrlp will immediately narrow down the search list and offer the best match. It can also be used to open mru files (most recently used files) and buffers and you can cycle between file/mru/buffer mode with ctrl+r and ctrl+f shortcuts.

## Ctrlp-funky

Ctrlp-funky extends the Ctrlp plugin (above) by adding function finding mode. You can either run the :CtrlPFunky command to immediately open Ctrlp in function search mode, or open Ctrlp by pressing ctrl+p and then press ctrl+r (or ctrl+f) a couple of times to go to function search mode. For example, if you have the void debug_print() function, you can type vodepr (first two letters of words void, debug, print), hit enter, and vim will jump to the definition of this function.

## Ctrlsf

With this plugin, you can quickly search and replace a lot of text. When you run the :CtrlSF pattern command, it creates a results window on the left with all the matches. The results window also has several context lines around the matches so that you know you're looking at the right match. You can now directly make edits in the results window. When you save the results window, the changes will be saved in the files, too. You can also press enter to open each result in the right window and edit it there.

## Delimitmate

Delimitmate automatically closes quotes and parenthesis. For example, you type " and it makes it "" and puts your cursor between the quotes.

## Diff-enhanced

This plugin adds a new diff visualization method to vimdiff, which tries to minimize the number of differences. When you're in diff mode, enter the :EnhancedDiff patience command and you should get better visualization of the diff.

## Dirvish

Dirvish embraces idiomatic buffer-driven development and it complements Nerdtree (below) as a file browser. When you hit the - key, the current buffer will turn into a file browser. You'll see all the files of either the current working directory or currently open file directory. You can then use the arrow keys hjkl and the search operator / to navigate this directory and find files. When you hit enter, Dirvish will exit and the file under the cursor will open in the current window as a new buffer. This plugin is especially powerful when you have multiple splits open as you're dictating in which split the next file will be opened. You just navigate to the split, hit -, find the file and, hit enter, and you have it open in the split that you want.

## Dsf

Dsf is short for delete surrounding functions. By pressing dsf in a function call, it will delete the surrounding function name. For example, if you have code like print_r(get_post|s(true)) and your cursor is where the | character is, then when you press dsf, you'll get get_posts(true) as output.

## Easy-align

With this extension you can neatly align text in columns. It adds the :EasyAlign command that you can bind to any keyboard shortcut that you want to. When you execute it, it asks for the column separator character and then formats the selected text. For example, to align code so that all = signs were in the same column, you can visually select the lines with the V command, then run :EasyAlign followed by = and then press enter.

## Easymotion

Easymotion makes it much quicker to navigate around the file. It adds the \\w shortcut that lets you quickly jump to any word after the cursor. It assigns a unique letter to each word and when you press it next, the cursor instantly jumps to that word. It also adds \\b shortcut that lets you quickly navigate backward. Similarly, if you need to jump to any line above or below, you can use \\k and \\j shortcuts.

## Exchange

With the Exchange plugin, you can very quickly swap two words. Go to the first word and press cxw, then go to the second word and press cxw again. Done – you just swapped these two words!

Actually, you can swap not just two words but any two motions. After you press cx, the next shortcut is a motion (a motion is a keyboard shortcut that moves the cursor). For example, to swap two characters, you can do cxl and then cxl again (l is a motion that moves the cursor one position to the right.) Similarly, to swap two sentences, you can do cxis and cxis again for the second sentence. In this case, the motion is is that selects the entire sentence.

Also, if both motions are the same, just press . to repeat the first motion.

## Expand-region

Often, you want to select just a little bit more text than you just selected. For example, you selected a word with viw but then you realize you wanted to select the entire quoted string. With this plugin, you can press + and it will expand the current selection to the next largest text object. Character to a word to a quoted string to a line to a paragraph to the entire file.

## Far

Far makes it easy to find and replace text in multiple files. It adds the :Far pattern1 pattern2 command. When you run this command, it splits the screen in two halves. In the upper half it shows all files and lines that pattern1 matches. In the lower half, it previews the match context. In the upper split, you can use hjkl keys to navigate matches. By default, all matches will be replaced with pattern2 but you can also use the t key to unmark the matches (and use t again to mark them). After you have selected all matches that you want to replace, run the :Fardo command. This command will perform the actual replacement.

Far also is great for grepping all matches. You can use :F pattern command and it will find all pattern matches and display them in two splits, but it won't do the replacement.

## Fugitive

With Fugitive, you can use git directly from vim. It adds the :Git command or :G for short that runs git status and shows the result in a split window. You can then use the s keyboard shortcut to stage (git add) a file, u to unstage (git reset) a file. After you stage the files, you can press cc to create a commit. I don't know how to do a git push yet so that's something I still have to learn. It would be pretty handy if I could git push code and deploy without leaving vim, too.

## Fzf

Fzf is an alternative to Ctrlp (above). It adds several commands for quickly opening files and switching buffers. These commands are :Files and :Buffers. If you were pressing tab multiple times to complete filenames and buffer names, now you only need to type a few letters of the filename or buffer name. For example, if you need to open options.c file, you can just type opt.c or even just oc and Fzf will offer you the best match.

## Fzf-mru

Fzf-mru adds an mru mode that can be accessed via the :FZFMru command. This mode lets you quickly access files that you recently edited. Let's say you worked on a scraper yesterday. Today, when you enter the mru mode, you can just type scra and it will show all files from the scraper project that you worked on yesterday.

## Gitgutter

Gitgutter adds two useful things. The first is an extra column on the left-most side of vim that quickly shows git diff information of the current file. You can quickly see which lines were added and changed. The second is the ]c and [c mappings that let you jump between the changed lines.

## Goyo

I have recently switched to programming in Goyo mode. When you type the :Goyo command, this plugin centers the content and removes line numbers and status line so that you can focus on distraction-free coding. It's especially great if you also make your vim fullscreen.

## Grepper

Grepper improves grepping in vim and adds ripgrep support. You can type :Grepper, then enter your search query, and it will find all matches and load them in the quickfix window. You can then use vim's :cn and :cp commands to navigate to next/previous match or use Unimpaired plugin's (below) shortcuts ]q and [q.

The author of this plugin suggests using it together with the qfenter.vim plugin and it's something I still have to try.

## Gv

Gv adds git commit browser to vim. You can run the :GV command and it will show the entire commit tree. You can then view individual diffs by pressing enter or o in the commit window. To exit diff viewer, press q. If you're interested in the git log of the current file only, then use the :GV! command.

## Illuminate

Illuminate highlights all occurrences of the word under the cursor in the currently visible buffer. For example, if the cursor is on the word var, then all other vars will be illuminated, too.

## Interestingwords

This plugin allows you to highlight multiple words at the same time. It adds the \k shortcut that changes the background color of the word under the cursor as well as all other occurrences of the same word in the file. You can also use n and N shortcuts to jump to the next/previous highlighted word. It's very useful when you're working on complicated code and need to keep track of how multiple variables are used.

## Linediff

Linediff allows you to quickly diff two blocks of text. Visually select the first block of text and run the :Linediff command. Then visually select the second block and run the same command again. This plugin will then create a new tab with a vertical split with the diff of two text blocks. If the results look too verbose, run the :EnhancedDiff patience command (from Diff-enhanced plugin, above) to improve the diff.

You can also quickly resolve git merge conflicts with this plugin. If you have a file open with a merge conflict in it, put the cursor between the merge conflict markers <<<<< and >>>>> and run the :LinediffMerge command. The plugin will then automatically create a vertical split with the merge conflict diff. You can then make edits in the left or the right split and automatically resolve the merge by running the :LinediffPick command.

## Listtoggle

Once you get to a certain level of proficiency in vim, you'll start using the quickfix window all the time (and also the location list windows) . Grep results will go in quickfix, linting errors will go in quickfix, compile errors will go in quickfix, todo lists will go in quickfix. Everything will go in quickfix. You'll be closing and opening quickfix all the time. Unfortunately, there's no easy way to toggle the quickfix window and location list windows. You have to use :copen and :cclose commands to open/close quickfix, and :lopenand :lclose to open/close location list. This is just too much typing.

Listtoggle makes it much easier and adds two shortcuts to quickly toggle them. The \q binding will toggle the quickfix window and the \l binding will toggle the location list window.

## Locate

Very often you need to find all occurrences of something in the current file. You don't want a global search, you don't want a search and replace, you don't want any splits, you just an overview of all results. Locate offers exactly that via the :Locate command or :L for short. Just type :L pattern and this plugin will open a quick location list with all occurrences of pattern in the current file. You can toggle the location list with the \l shortcut (offered by Listtoggle plugin, above) and you can navigate through the results via the ]l (next result) and [l (previous result) shortcuts (offered by Unimpaired plugin, below.)

## Matchtagalways

This plugin highlights the innermost opening and closing HTML tags that your cursor is positioned in. For example, if you're between <div class="post">cursor here</div>, then this plugin will highlight <div> and </div> tags.

## Matchup

Matchup adds the % shortcut that lets you quickly jump between matching pairs of parenthesis. If your cursor is on the { character, then after pressing % it will jump to }. If you press % again, it will jump back to the opening paren. It also adds the z% shortcut that lets you jump forward inside the next pair of parenthesis. Let's say you have a function pri|nt_data("hi", 7) and your cursor is |. Then after pressing z%, you'll be in the function arguments.

## Nerdcommenter

Nerdcommenter is another code comment plugin. With Commentary (above) you can quickly toggle comments with the gc shortcut but Nerdcommenter gives more control over comments. For example, you can do multi-line comments with the \cm shortcut and add comments at the end of the line with the \cA shortcut.

## Nerdtree

Nerdtree is a file manager. It shows a full directory and file tree structure of the current project on vim's left side. To open and close Nerdtree, run the :NERDTreeToggle command. For convenience, you can bind it to the \t shortcut. When it's open, you can navigate around using the regular hjkl keys. Use the O key to open all directories in the project and then search for files using the regular / search operator. To open the file under the cursor on the right side, press the o key. To see the hidden files, use the I key. Compared to Dirvish (above), it embraces file-manager driven development. Instead of you dictating where to open a file, Nerdtree always opens it on the right side.

## Nerdtree-syntax-highlight

This plugin adds syntax highlighting to Nerdtree. Files and directories now have different colors.

## Peekaboo

Vim has many different registers. When you copy text, it goes in the " register. When you delete text, it goes in the number registers. Then there are lowercase and uppercase registers for your personal use, and many more.

This plugin previews the registers when you're about to use them. When you press the " key, it opens a register cheat sheet on the right and you can see the contents of each register and choose the right register. You can also press the space key to make the register cheat sheet larger.

## Qfgrep

Quickfix is one of vim's greatest features. Unfortunately, once a quickfix list is populated with the results, it's frozen. You can't filter the quickfix list further. This behavior doesn't make much sense because you always want to refine the results.

Qfgrep lets you do that. You can now filter the results in the quickfix window. Use the \g shortcut to filter results, \v to invert filtering results, and \r to restore the original entries. It also adds the :QFGrepPat command that does the same as \g and :QFGrepPatV that does the same as \v.

## Qlist

Qlist adds the :Ilist function that is an improved version of vim's built-in :ilist function. The built-in :ilist function comes from a time when computers didn't have much memory so it's not very useful as it prints everything to the screen in a hurry and you can't use the results (also see Bufferize plugin, above). The improved :Ilist function creates a quickfix list from the results. You can now run :Ilist pattern and this plugin will find all uses of the word pattern in the current and included project files and put them in the quickfix window, exactly where you want all the results always to go.

## Quickfix-reflector

Not only do you want to filter quickfix results (with Qfgrep, above), you also want to edit the quickfix window as if it was simply just another buffer. This plugin makes the quickfix window modifiable. You can now use dd to delete quickfix entries and i to add new entries. You can also directly edit the quickfix results and when you save the quickfix window via :w, the files will get updated, too.

## Ragtag

Ragtag adds three useful keyboard shortcuts for working with HTML tags. The first one is ctrl+x/ that closes any open tag. For example, if you're in a <div> tag, then you can immediately close it and get <div>...</div>. The second is ctrl+xSPACE that creates an opening and closing tags from the word that you just typed. For example, if you typed tag and then immediately pressed this shortcut, then you'll get <tag>|</tag>, where | is the cursor. The third is ctrl+xENTER that works the same way as the previous shortcut but puts an empty line between the two tags.

## Ranger

This plugin lets you jump to the external Ranger file manager to open a file in vim. It's similar to Dirvish (above) and lets you easily do buffer-driven development. When you run the :Ranger command in any window, it launches the ranger process. Then, when you select a file, it will open in the selected file as a new buffer.

## Repeat

Repeat improves the . command. It lets you repeat commands and actions of other plugins. For example, if you wrap text in quotes using the Surround plugin (below), then pressing . will repeat that.

## Replace-with-register

Something that you very often do in vim is pasting from a register. Usually, this is done by either first deleting what you want to replace and then pasting, or visually selecting the part to replace and then pasting. Often, you know exactly what you will be replacing. For example, a sentence, a paragraph, or a word. This plugin adds the replace-motion-with-a-register shortcutgr{motion}. For example, to replace a sentence, you can simply do gris (is is the motion that selects the current sentence). To replace the current word, you can do just griw. It also adds another useful shortcut grr that replaces the entire line.

## Replace-indent-with-register

The problem with the Replace-with-register plugin (above) is that when using the grr shortcut, the entire line is replaced without keeping the indent. This plugin fixes that and adds the grR shortcut that does the same as grr but also keeps the indent of the current line.

## Rooter

As vim is not an IDE, it has little to no notion of projects and doesn't know what a project's root directory is. When you try to open a file, vim searches either your home directory or some other directory and not the project's directory.

This plugin makes working with projects a tiny bit easier by automatically setting vim's current working directory to project's directory. It does it by looking for the root-most .git directory. Usually, the presence of such directory indicates where the project starts.

## Scratch

Vim's documentation mentions a special buffer type called a scratch buffer. This plugin implements it. A scratch buffer is a temporary throw-away buffer. It's useful for making quick notes as you're working on a project. Use the :Scratch command to open it. The cursor will jump to the scratch window at the top. When you move the cursor to another window, the scratch window will automatically close.

## Signature

When using marks, there's no way visual way to tell where you added them. You may remember one or two marks but when you add more, you get lost. This plugin solves this problem and displays marks in the left-most column. You can add and toggle marks with the default shortcuts ma, mb, ..., remove individual marks with dma, dmb, ..., remove all marks with m-, jump to the next and previous mark with ] and [, and put all marks in a location list window with m/.

## Speeddating

In normal mode, ctrl+a and ctrl+x increment and decrement numbers. This plugin makes these keyboard shortcuts also increment dates and clock times. For example, if the cursor is on a string 2000-01-31, then pressing ctrl+a will make it 2000-02-01 and pressing ctrl+z will make it 2000-01-30.

## Splitjoin

Splitjoin lets you switch code snippets from single-line statements to multi-line statements and back. Let's say you have a single-line HTML snippet <div class="welcome"> hi </div>, then after pressing gS (split), it will turn into a multi-line HTML snippet <div class="welcome">\n hi \n</div>. If you press gJ (join) on this multi-line snippet will turn it back into a single-line snippet.

## Undoquit

Often, you're just too quick and close a window that you didn't want to close. With this plugin, you can now hit ctrl+w+u and undo a closed window.

## Unicode

This plugin lets you quickly search and insert Unicode characters. For example, if you want to insert a Unicode rabbit symbol, you can type rabbit and then press ctrl+x ctrl+z. The typed text rabbit will get substituted with a rabbit emoji.

## Unimpaired

Many commands come in pairs. For example, :bn and :bp to go to the next/previous buffer, :cn and :cp that go to the next/previous quickfix list item, :ln and :lp that go to the next/previous location list item, etc. This plugin adds quick shortcuts for these commands. You can now ]b and [b to go to the next/previous buffer, ]q and [q to go to the next/previous quickfix entry, ]l and [l to o to the next/previous location list entry, etc.

When you're working with multiple split windows, after a short distraction, it's easy to forget which split you're working in. This plugin fades all splits so that the currently focused split is clearly visible.

## Visual-repeat

The Repeat plugin (above) repeats normal mode commands when you press .. This plugin extends Repeat to work in the visual mode. When you select a visual region and press . it will run the normal mode commands only on the selected area.

## Visual-split

Often, you need to keep a comment, a function definition, or a code fragment above the fold so that it's always visible. The usual approach is to split the window with ctrl+w+s and then resize it smaller with 10ctrl+w+-. This plugin merges these two actions. You can now visually select the area and press ctrl+w+gss. The plugin will split the window and resize it to exactly fit the selected lines.

## Writeable-search

Writeable-search is similar to CtrlSF (above). It lets you quickly find results and immediately edit them in the results window. When you run the :WritableSearch pattern command, it will grep all files in the current directory for the pattern and open a new tab with the results. You can then edit the results and when you do a :w in the same results window, it will update files with changes. If you already have a list of things to fix in the quickfix window, then you can transfer them to this plugin for editing via the :WritableSearchFromQuickfix command.

See you next time!