From 7e7afd6ebda5a5d6fa5bb6fed7bb2be9864c65b9 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Wed, 1 Apr 2026 20:53:20 -0400 Subject: Adjust vim config --- .vimrc | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 61e87f8..f2a9547 100644 --- a/.vimrc +++ b/.vimrc @@ -3,7 +3,13 @@ set nocompatible " Use system clipboard -set clipboard=unnamedplus +" +" https://stackoverflow.com/a/39313208 +if has('macunix') + set clipboard=unnamed +elseif has('unix') + set clipboard=unnamedplus +endif " Enable a number column with numbers relative " to the current line the cursor is on. @@ -30,3 +36,40 @@ set softtabstop=4 " Number of spaces to use for auto-indentation set shiftwidth=4 +let g:mapleader = "\" +let g:maplocalleader = ',' + +" Show quickfix list easier +nnoremap q :copen + +" Setup key mappings for fzf.vim +" +" Fuzzy find files +noremap ff :Files +" live grep (need ripgrep) +noremap fg :Rg +" grep word under cursor +noremap fw :Rg +" recently opened files +noremap fr :History +" recently opened files +noremap fh :Helptags +" open buffers +noremap fb :Buffers +" lines in current buffer +noremap fl :BLines +" lines across all buffers +noremap fL :Lines +" command history +noremap f: :History: +" search history +noremap f/ :History/ +" marks +noremap fm :Marks +" ctags +noremap ft :Tags + +" Configure yank highlighting to be quicker (200ms) and not show +" up in visual mode +let g:highlightedyank_highlight_duration = 200 +let g:highlightedyank_highlight_in_visual = 0 -- cgit v1.2.3