Further Vim configuration

This commit is contained in:
Rob Watson 2021-01-07 14:43:19 +01:00
parent 297a770694
commit 94cca3f006
1 changed files with 16 additions and 2 deletions

18
vimrc
View File

@ -18,6 +18,7 @@ set smarttab
set encoding=utf-8 set encoding=utf-8
set nocompatible set nocompatible
set t_Co=256 set t_Co=256
set termguicolors
set hidden set hidden
set history=1000 set history=1000
set nowrap set nowrap
@ -59,7 +60,7 @@ set shortmess+=I
set thesaurus=$HOME/Documents/thesaurus/thesaurus_pkg/thesaurus.txt set thesaurus=$HOME/Documents/thesaurus/thesaurus_pkg/thesaurus.txt
" Colour scheme: " Colour scheme:
colorscheme iceberg colorscheme flattened_dark
set background=dark set background=dark
" Key mappings: " Key mappings:
@ -87,6 +88,19 @@ function! ToggleQuickFix()
endfunction endfunction
map <silent> <leader>q <esc>:call ToggleQuickFix()<cr> map <silent> <leader>q <esc>:call ToggleQuickFix()<cr>
" vim-ripgrep configuration:
let g:rg_highlight = 1
function RequestGrep()
call inputsave()
let s:pattern = trim(input("grep: "))
call inputrestore()
if len(s:pattern) > 0
execute 'Rg' s:pattern
endif
endfunction
map <Leader>* :call RequestGrep()<CR>
map <Leader>8 :call RequestGrep()<CR>
" vim-markdown configuration: " vim-markdown configuration:
let g:vim_markdown_conceal = 3 let g:vim_markdown_conceal = 3
@ -139,6 +153,7 @@ function SymbolSearch()
execute 'ALESymbolSearch' s:pattern execute 'ALESymbolSearch' s:pattern
endif endif
endfunction endfunction
map <Leader>ss :call SymbolSearch()<CR>
nmap <silent> <leader>af :ALEFirst<cr> nmap <silent> <leader>af :ALEFirst<cr>
nmap <silent> <leader>al :ALELast<cr> nmap <silent> <leader>al :ALELast<cr>
nmap <silent> <leader>an :ALENextWrap<cr> nmap <silent> <leader>an :ALENextWrap<cr>
@ -146,7 +161,6 @@ nmap <silent> <leader>ap :ALEPreviousWrap<cr>
nmap <silent> <leader>aN :ALENext -error<cr> nmap <silent> <leader>aN :ALENext -error<cr>
nmap <silent> <leader>aP :ALEPrevious -error<cr> nmap <silent> <leader>aP :ALEPrevious -error<cr>
nmap <leader>ad :ALEDetail<cr> nmap <leader>ad :ALEDetail<cr>
map <Leader>ss :call SymbolSearch()<CR>
map <Leader>g :ALEGoToDefinition<CR> map <Leader>g :ALEGoToDefinition<CR>
map <Leader>gt :ALEGoToTypeDefinition<CR> map <Leader>gt :ALEGoToTypeDefinition<CR>
map <Leader>f :ALEFindReferences<CR> map <Leader>f :ALEFindReferences<CR>