diff --git a/vimrc b/vimrc index 5d1d3c4..bec827f 100644 --- a/vimrc +++ b/vimrc @@ -206,22 +206,30 @@ set foldlevel=1 set backup set undofile -" 21 command line editing {{{2 +" 21 - command line editing {{{2 set wildignore+=*.o -" 23 quickfix {{{2 +" 23 - quickfix {{{2 -" See https://phelipetls.github.io/posts/extending-vim-with-ripgrep/ +" External grep +" +" Tutorial: https://phelipetls.github.io/posts/extending-vim-with-ripgrep/ +" if executable("rg") - " Quickfix Unimpaired: [q ]q + set grepprg=rg\ --vimgrep + set grepformat=%f:%l:%c:%m + + " Quickfix " :gr[ep] " :grepa[dd] - " Location Unimpaired: [l ]l + " Location " :lgr[ep][!] - set grepprg=rg\ --vimgrep - set grepformat=%f:%l:%c:%m + + " Unimpaired shortcuts: + " [^Q ]^Q [Q ]Q [q ]q (file/first/previous) + " Same with L endif " 26 - various {{{2 @@ -232,6 +240,8 @@ set gdefault " use the 'g' flag for ":substitute" """ Key Mapping {{{1 """"""""""""""""""""""" +" To test whether a mapping is already used: try the command with no {rhs} + " See :map-special-keys, :map-special-chars & " To see all mappings into a buffer: @@ -241,6 +251,7 @@ set gdefault " use the 'g' flag for ":substitute" "" let mapleader="²" +" Use with nmap ( [ nmap ) ] @@ -598,8 +609,8 @@ autocmd FileType cpp setlocal comments^=:/// foldmethod=syntax foldlevel=0 "" "" Find, substitute, and abbreviate several variations of a word at once. -" abolish-coercion -" camelCase MixedCase _snake_case UPPERCASE -dash-case dot.case space Title +" :help abolish-coercion + "" ALE {{{2 ""