diff options
author | Matthew Lemon <y@yulqen.org> | 2023-06-02 21:04:13 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-06-02 21:04:13 +0100 |
commit | 232a6370180bb2a7112ddef2ec9077bd21b39a02 (patch) | |
tree | 0c6c06698a07d756fe3c3d6bc65590cff659a9c5 /vim | |
parent | e646aa4ed1cb4642b72f0a7d5b0b98327486155d (diff) |
Added an ephemera.vim file for the colourscheme
This is also ignored. It just contains the colorscheme.
Diffstat (limited to 'vim')
-rw-r--r-- | vim/vimrc | 31 |
1 files changed, 25 insertions, 6 deletions
@@ -43,10 +43,10 @@ set listchars=tab:»→,trail:␣ set shortmess+=c set tags+=./tags set background=dark -set scrolloff=0 set completeopt=menuone,longest -colorscheme gruber-darker +" colorscheme goes here, outside source control +source ~/.vim/ephemera.vim highlight SignColumn guibg=blue ctermbg=black " macro to go to end of sentence and add a line break (for @@ -98,6 +98,7 @@ Plug 'vim-test/vim-test' Plug 'ledger/vim-ledger' Plug 'fatih/vim-go', {'do': ':GoUpdateBinaries' } Plug 'tpope/vim-dispatch' +Plug 'tpope/vim-surround' Plug 'tpope/vim-commentary' Plug 'tpope/vim-unimpaired' Plug 'tpope/vim-fugitive' @@ -105,12 +106,12 @@ Plug 'SirVer/UltiSnips' Plug 'honza/vim-snippets' call plug#end() -" replace vimgrep with Ag -if executable('ag') - set grepprg=ag\ --vimgrep\ --nogroup\ --nocolor +" Make :grep use ripgrep +if executable('rg') + set grepprg=rg\ --color=never\ --vimgrep endif -" or search with ripgrep +" and search with ripgrep command! -bang -nargs=* Rg \ call fzf#vim#grep( \ 'rg --column --line-number --no-heading --color=always --ignore-case '.shellescape(<q-args>), 1, @@ -120,6 +121,24 @@ command! -bang -nargs=* Rg nnoremap <C-p>a :Rg +" Generate ctags for current working directory +nnoremap <leader>tt :silent !ctags -R . <CR>:redraw!<CR> + +" notes stuff - from https://www.edwinwenink.xyz/posts/43-notes_tagging/ +" Go to index of notes and set working directory to my notes +nnoremap <leader>ni :e $NOTES_DIR/index.md<CR>:cd $NOTES_DIR<CR> + +" 'Notes Grep' with ripgrep (see grepprg) +" -i case insensitive +" -g glob pattern +" ! to not immediately open first search result +command! -nargs=1 Ngrep :silent grep! "<args>" -i -g '*.md' $NOTES_DIR | execute ':redraw!' +nnoremap <leader>nn :Ngrep + +" Open quickfix list in a right vertical split (good for Ngrep results) +command! Vlist botright vertical copen | vertical resize 50 +nnoremap <leader>v : Vlist<CR> + " vim-test nmap <silent> tn :TestNearest<CR> nmap <silent> tf :TestFile<CR> |