How do I resolve a 3-way merge conflict in vim-fugitive by picking a specific version?
When resolving Git merge conflicts with vim-fugitive, running :Gvdiffsplit! opens a 3-way split: your current branch (left), the working file with conflict mark
category:
plugins
tags:
#plugins
#git
#fugitive
#diff
#merge
How do I jump to the next LSP diagnostic error or warning in Neovim?
vim.diagnostic.goto_next()
Neovim's built-in vim.
category:
plugins
tags:
#plugins
#lsp
#diagnostics
#neovim
#navigation
How do I close all windows except the current one?
The :only command closes every window in the current tab page except the one your cursor is in.
category:
buffers-windows
tags:
#buffers-windows
#windows
#ex-commands
How do I use glob() in Vimscript to get a list of files matching a wildcard pattern?
The glob() built-in function expands a wildcard pattern into a list of matching filesystem paths, entirely within Vimscript.
category:
config
tags:
#config
#vimscript
#files
#ex-commands
How do I close the current window in Vim?
The c (Ctrl+w then c) command closes the current window without closing the buffer it contains.
category:
buffers-windows
tags:
#buffers-windows
#windows
#normal-mode
How do I quickly switch between the current file and the last edited file?
Pressing (Ctrl-6 on most keyboards) instantly toggles between the current buffer and the alternate file — the last file you were editing.
category:
buffers-windows
tags:
#navigation
#buffers
#normal-mode
#productivity
#windows
How do I use the leader key to create my own keyboard shortcuts?
let mapleader = ' ' then nnoremap <leader>key command
The leader key is a configurable prefix for your custom key mappings.
category:
config
tags:
#config
#mappings
#vimrc
#leader
#workflow
How do I insert the contents of another file into the current buffer?
The :r filename command reads the contents of filename and inserts them into the current buffer below the cursor line.
category:
command-line
tags:
#ex-commands
#editing
#buffers
How do I resolve a 3-way merge conflict by pulling changes from a specific buffer in diff mode?
When Vim's diff mode has three or more buffers open, :diffget (or do) without an argument is ambiguous — Vim cannot determine which buffer to pull from.
category:
buffers-windows
tags:
#buffers
#windows
#ex-commands
How do I insert the output of a shell command into my file?
The :r !command command executes a shell command and inserts its output directly into the current buffer below the cursor line.
category:
command-line
tags:
#command-line
#ex-commands
#editing
How do I quickly jump between a small set of frequently used files?
Harpoon: mark files and jump with <leader>1-4
Harpoon by ThePrimeagen provides instant access to a curated list of files you're actively working on.
category:
plugins
tags:
#plugins
#navigation
#neovim
#harpoon
#workflow
How do I switch between buffers without being forced to save first?
By default, Vim refuses to let you switch away from a buffer that has unsaved changes, forcing you to save or discard with :w or :e! before moving on.
category:
config
tags:
#config
#buffers
#vimrc
#productivity
#workflow
How do I fuzzy-search and switch between open buffers in Vim?
The fzf.
category:
plugins
tags:
#plugins
#fzf
#buffers
#navigation
#workflow