From 94cca3f006f803ae240a945388c5f41ec131d73a Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Thu, 7 Jan 2021 14:43:19 +0100 Subject: [PATCH] Further Vim configuration --- vimrc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index 20d636d..e84665b 100644 --- a/vimrc +++ b/vimrc @@ -18,6 +18,7 @@ set smarttab set encoding=utf-8 set nocompatible set t_Co=256 +set termguicolors set hidden set history=1000 set nowrap @@ -59,7 +60,7 @@ set shortmess+=I set thesaurus=$HOME/Documents/thesaurus/thesaurus_pkg/thesaurus.txt " Colour scheme: -colorscheme iceberg +colorscheme flattened_dark set background=dark " Key mappings: @@ -87,6 +88,19 @@ function! ToggleQuickFix() endfunction map q :call ToggleQuickFix() +" 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 * :call RequestGrep() +map 8 :call RequestGrep() + " vim-markdown configuration: let g:vim_markdown_conceal = 3 @@ -139,6 +153,7 @@ function SymbolSearch() execute 'ALESymbolSearch' s:pattern endif endfunction +map ss :call SymbolSearch() nmap af :ALEFirst nmap al :ALELast nmap an :ALENextWrap @@ -146,7 +161,6 @@ nmap ap :ALEPreviousWrap nmap aN :ALENext -error nmap aP :ALEPrevious -error nmap ad :ALEDetail -map ss :call SymbolSearch() map g :ALEGoToDefinition map gt :ALEGoToTypeDefinition map f :ALEFindReferences