From 6328ff96dabed92b71f394b96b345f82d542b8eb Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 16 Mar 2023 16:01:20 +0000 Subject: better vim stuff for notetaking --- vim/vimrc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc index b34edc9..fe7d05b 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -122,7 +122,9 @@ set equalalways set showmode set nobackup set listchars=tab:»→,trail:␣ -set grepprg=/usr/bin/ag +if executable('rg') + set grepprg=rg\ --color=never\ --vimgrep +endif " i don't bother with folding, but it's here if i need it. if has('folding') @@ -422,6 +424,17 @@ let g:fzf_colors = imap (fzf-complete-file-ag) imap (fzf-complete-line) +" ghetto note system +" Go to index of notes +nnoremap ni :e ~/Documents/Notes/index.md:cd ~/Documents/Notes +" Depends on grepprg being set to rg +command! -nargs=1 Ngrep grep "" -g "*.md" ~/Documents/Notes +nnoremap nn :Ngrep + +" open quicklist vertical +command! Vlist botright vertical copen | vertical resize 50 +nnoremap v :Vlist + " Search with ripgrep command! -bang -nargs=* Rg \ call fzf#vim#grep( -- cgit v1.2.3