aboutsummaryrefslogtreecommitdiffstats
path: root/.vimrc
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2026-04-01 20:53:20 -0400
committerEugene Triguba <hello@eugenetriguba.com>2026-04-01 20:56:28 -0400
commit7e7afd6ebda5a5d6fa5bb6fed7bb2be9864c65b9 (patch)
treeffb49bfb4b73eafba917c5151118b85c40ae195c /.vimrc
parentRemove unnecessary use of shell-command-to-string (diff)
downloaddotfiles-7e7afd6ebda5a5d6fa5bb6fed7bb2be9864c65b9.zip
Adjust vim config
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc45
1 files changed, 44 insertions, 1 deletions
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 = "\<Space>"
+let g:maplocalleader = ','
+
+" Show quickfix list easier
+nnoremap <Leader>q :copen<CR>
+
+" Setup key mappings for fzf.vim
+"
+" Fuzzy find files
+noremap <silent> <leader>ff :Files<CR>
+" live grep (need ripgrep)
+noremap <silent> <leader>fg :Rg<CR>
+" grep word under cursor
+noremap <silent> <leader>fw :Rg <C-R><C-W><CR>
+" recently opened files
+noremap <silent> <leader>fr :History<CR>
+" recently opened files
+noremap <silent> <leader>fh :Helptags<CR>
+" open buffers
+noremap <silent> <leader>fb :Buffers<CR>
+" lines in current buffer
+noremap <silent> <leader>fl :BLines<CR>
+" lines across all buffers
+noremap <silent> <leader>fL :Lines<CR>
+" command history
+noremap <silent> <leader>f: :History:<CR>
+" search history
+noremap <silent> <leader>f/ :History/<CR>
+" marks
+noremap <silent> <leader>fm :Marks<CR>
+" ctags
+noremap <silent> <leader>ft :Tags<CR>
+
+" 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