From d02bb711bdb8d94025c3da634b0c742d5f541e18 Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Wed, 21 Jul 2021 08:30:16 +0200 Subject: [PATCH] plugins: add keybindings for fzf commands * Removes ctrlP plugin and configuration. * Stop opening nerdTree by default. * Adds keybindings for fzf commands. Co-Authored-by: iGor milhit --- init.vim | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/init.vim b/init.vim index 486dcc8..e32a583 100644 --- a/init.vim +++ b/init.vim @@ -30,7 +30,6 @@ Plug 'pappasam/coc-jedi', { 'do': 'yarn install --frozen-lockfile && yarn build' Plug 'stsewd/isort.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'vitalk/vim-simple-todo' " Allow to manage todo list easily " Search -Plug 'kien/ctrlp.vim' " Search 'Ctrl+P' like Plug 'jremmen/vim-ripgrep' " Use ripgrep as vimgrep Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " Fuzzy search, ensure fzf is fresh installed Plug 'junegunn/fzf.vim' " fzf for vim/neovim @@ -128,22 +127,13 @@ let g:airline_theme='nord' let g:table_mode_corner='|' " NERDTree. By default, NERDTree is open when no file is provided when launching vim/neovim -autocmd StdinReadPre * let s:std_in=1 -autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif +" autocmd StdinReadPre * let s:std_in=1 +" autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif let g:NERDTreeWinSize=40 " vim-json, don't conceal let g:vim_json_syntax_conceal=0 -" ctrlP -" Match window position, number of results -let g:ctrlp_match_window='top,order:ttb,min:1,max:10,results:10' -"set the working directory -let g:ctrlp_working_path_mode='ra' -" enable caching -let g:ctrlp_use_caching=1 -let g:ctrlp_clear_cache_on_exit=0 - " Pandoc " Autoformatting with hardwrap let g:pandoc#formatting#mode="hA" @@ -265,6 +255,20 @@ let g:vimtex_compiler_latexmk = { \ ], \} +" ######################################### +" ######################################### +" Key bindings for FZF +nnoremap gf :GFiles +nnoremap gs :GFiles? +nnoremap h :History +nnoremap hc :History: +nnoremap hs :History/ +nnoremap l :Lines +nnoremap bl :BLines +nnoremap c :Commits +nnoremap bc :BCommits +nnoremap ? :Helptags + " Syntax coloration and color theme syntax enable colorscheme nord