From 52bccdd45a0e24fa8d38679da3b3d78654761bf6 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 13 Dec 2017 12:24:31 +0100 Subject: Remove vim-grepper --- vim/.vimrc | 101 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 50 insertions(+), 51 deletions(-) (limited to 'vim/.vimrc') diff --git a/vim/.vimrc b/vim/.vimrc index 4f7cdc3..680acad 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -13,11 +13,10 @@ Plug 'LnL7/vim-nix' Plug 'PotatoesMaster/i3-vim-syntax' Plug 'SirVer/ultisnips' Plug 'airblade/vim-gitgutter' -Plug 'altercation/vim-colors-solarized' -Plug 'arcticicestudio/nord-vim' Plug 'beloglazov/vim-online-thesaurus' Plug 'christoomey/vim-tmux-navigator' Plug 'critiqjo/lldb.nvim' +Plug 'easymotion/vim-easymotion' Plug 'embear/vim-localvimrc' Plug 'holomorph/vim-freefem' Plug 'honza/vim-snippets' @@ -27,9 +26,7 @@ Plug 'kopischke/vim-stay' Plug 'jamessan/vim-gnupg' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' -Plug 'junegunn/goyo.vim' Plug 'junegunn/gv.vim' -Plug 'junegunn/heytmux' Plug 'junegunn/vim-easy-align' Plug 'junegunn/vim-peekaboo' Plug 'junegunn/vim-slash' @@ -39,7 +36,6 @@ Plug 'kshenoy/vim-signature' Plug 'lervag/vimtex' Plug 'machakann/vim-highlightedyank' Plug 'majutsushi/tagbar' -Plug 'mhinz/vim-grepper' Plug 'mhinz/vim-startify' Plug 'neomake/neomake' Plug 'scrooloose/nerdtree' @@ -64,7 +60,6 @@ Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'vim-scripts/ReplaceWithRegister' Plug 'vim-scripts/gmsh.vim' -Plug 'vim-scripts/paredit.vim' Plug 'wellle/targets.vim' if has("nvim") @@ -77,10 +72,12 @@ else endif " Colors +Plug 'altercation/vim-colors-solarized' Plug 'KKPMW/moonshine-vim' -Plug 'romainl/Apprentice' +Plug 'arcticicestudio/nord-vim' Plug 'junegunn/seoul256.vim' Plug 'noah/vim256-color' +Plug 'romainl/Apprentice' call plug#end() "" Plugin mappings @@ -92,10 +89,14 @@ nnoremap cpn :NERDTreeToggle nnoremap cpt :TagbarToggle nnoremap cpu :GundoToggle +" Easy motion +map s (easymotion-prefix) + " Fuzzy finder nnoremap a :Ag nnoremap b :Buffers nnoremap c :Commands +nnoremap C :Colors nnoremap f :Files nnoremap g :GitFiles nnoremap r :History @@ -256,26 +257,27 @@ let g:tex_flavor='latex' "" Vim options set complete+=k +set conceallevel=2 set cursorline -set smartindent +set diffopt=filler,vertical set expandtab -set tabstop=4 -set softtabstop=4 -set shiftwidth=4 -set showcmd set foldmethod=marker +set hidden +set ignorecase +set lazyredraw +set nojoinspaces set noswapfile +set nowrap set nowritebackup +set shiftwidth=4 +set showcmd +set smartcase +set smartindent +set softtabstop=4 +set t_Co=256 +set tabstop=4 set undodir=~/.vim/vimundo/ set undofile -set diffopt=filler,vertical -set nowrap -set conceallevel=2 -set nojoinspaces -set smartcase -set ignorecase -set lazyredraw -set hidden " set formatoptions+=orw silent! set breakindent let &showbreak='--> ' @@ -288,7 +290,6 @@ if has("nvim") set inccommand=split endif - "" Mappings nmap n nzz nmap N Nzz @@ -303,20 +304,11 @@ nnoremap w :update nnoremap q :q! nnoremap d :bd! -nmap gs :set opfunc=Searchg@ -xmap gs :call Search(visualmode()) -function! Search(vm) - let is_visual=(a:vm == "v") - let l=getline(is_visual ? "'<" : "'[") - let [line1,col1] = getpos(is_visual ? "'<" : "'[")[1:2] - let [line2,col2] = getpos(is_visual ? "'>" : "']")[1:2] - call feedkeys(':Grepper -tool git -query "' . l[col1 - 1: col2 - 1] . '"') -endfunction nnoremap tn :tabnew nnoremap te :tabedit -nnoremap th :-tabmove nnoremap tl :+tabmove +nnoremap th :-tabmove nnoremap tm :tabmove nnoremap t0 :tabmove 0 nnoremap t$ :tabmove @@ -355,28 +347,11 @@ if has("nvim") tnoremap endif -set t_Co=256 "" Colorscheme -let hostname = substitute(system('hostname'), '\n', '', '') - -if hostname == "navajo" - silent! colo $COLORSCHEME - if $BACKGROUND=="dark" - set background=dark - elseif $BACKGROUND=="light" - set background=light - endif +let g:airline_theme='deus' +colo apprentice - if $COLORSCHEME=="solarized" - let g:airline_theme='base16' - else - let g:airline_theme=$COLORSCHEME - endif -else - colorscheme nord - let g:airline_theme="nord" -endif "" Autocommands augroup vimrc @@ -391,9 +366,33 @@ augroup vimrc au FileType freefem comp freefem au FileType dirvish setlocal relativenumber au FileType tex set spell + au BufWritePost *vimrc :source % au BufWritePre * \ if !isdirectory(expand(':p:h')) | \ call mkdir(expand(':p:h'), 'p') | \ endif - au BufWritePost *vimrc :source % augroup END + + +"" My search +if executable("ag") + set grepprg=ag\ --vimgrep + set grepformat^=%f:%l:%c:%m +endif + +if executable("rg") + set grepprg=rg\ --vimgrep + set grepformat=%f:%l:%c:%m +endif + +command! -nargs=+ -complete=file_in_path Grep execute 'silent grep!' | cw | redraw! + +nmap gs :set opfunc=Searchg@ +xmap gs :call Search(visualmode()) +function! Search(vm) + let is_visual=(a:vm == "v") + let l=getline(is_visual ? "'<" : "'[") + let [line1,col1] = getpos(is_visual ? "'<" : "'[")[1:2] + let [line2,col2] = getpos(is_visual ? "'>" : "']")[1:2] + call feedkeys(':Grep "' . l[col1 - 1: col2 - 1] . '"') +endfunction -- cgit v1.2.3