Skip to content

Instantly share code, notes, and snippets.

@3tc
3tc / vimdiff.md
Created September 10, 2025 22:56 — forked from samiraguiar/vimdiff.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

general.import = [
"$HOME/.config/alacritty/catppuccin-mocha.toml"
]
[font]
size = 14.0
[font.bold]
family = "Jetbrains Mono Nerd Font"
-- CodeCompanion
vim.keymap.set({ "n", "v" }, "<C-a>", "<cmd>CodeCompanionActions<cr>", { noremap = true, silent = true })
vim.keymap.set({ "n", "v" }, "<LocalLeader>a", "<cmd>CodeCompanionChat Toggle<cr>", { noremap = true, silent = true })
vim.keymap.set("v", "ga", "<cmd>CodeCompanionChat Add<cr>", { noremap = true, silent = true })
-- Expand 'cc' into 'CodeCompanion' in the command line
vim.cmd([[cab cc CodeCompanion]])
require("mcphub").setup({
extensions = {
codecompanion = {
-- Show the mcp tool result in the chat buffer
-- NOTE:if the result is markdown with headers, content after the headers wont be sent by codecompanion
show_result_in_chat = true,
make_vars = true, -- make chat #variables from MCP server resources
make_slash_commands = true, -- make /slash_commands from MCP server prompts
}
}
return {
{
"olimorris/codecompanion.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"hrsh7th/nvim-cmp", -- Optional: For using slash commands and variables in the chat buffer
"nvim-telescope/telescope.nvim", -- Optional: For using slash commands
{ "MeanderingProgrammer/render-markdown.nvim",
ft = { "markdown", "codecompanion" } -- Optional: For prettier markdown rendering
syntax on
set t_Co=256
color desert
" ignore case on searches
set ic
" don't clear on exit
# original source-file
# - https://raw.githubusercontent.com/josean-dev/dev-environment-files/main/.tmux.conf
# - install tpm git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
set -g default-terminal "screen-256color"
set-option -g terminal-overrides ',xterm-256color:RGB'
set -g base-index 1
set -g status-keys vi
set -g history-limit 100000
theme = catppuccin-mocha
background-opacity = 0.8
command = /usr/bin/bash
keybind = ctrl+comma=open_config
keybind = shift+insert=paste_from_selection
keybind = ctrl+page_down=next_tab
keybind = ctrl+shift+v=paste_from_clipboard
keybind = ctrl+alt+up=goto_split:up
keybind = ctrl+shift+a=select_all
keybind = shift+up=adjust_selection:up