nvim/vim: parity

- add fzf to vim
- update looks of telescope
This commit is contained in:
Marco Thomas
2023-03-06 23:27:31 +01:00
parent b78405d1bd
commit aee29e8ca3
3 changed files with 25 additions and 9 deletions

View File

@@ -15,9 +15,11 @@ call plug#begin()
Plug 'tpope/vim-sleuth' " heuristic file indendation
Plug 'jiangmiao/auto-pairs' " pair completion
Plug 'ctrlpvim/ctrlp.vim' " file finder
Plug 'tpope/vim-fugitive' " git wrapper
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'sainnhe/everforest' " color scheme
Plug 'vim-airline/vim-airline' " a nicer status line
Plug 'vim-airline/vim-airline-themes' " auto settings theme for airline
@@ -106,13 +108,21 @@ let g:netrw_liststyle = 3 " Tree-like structure
let g:netrw_banner = 0 " Remove useless banner at the top of netrw
" ============================== Macros and Mappings
map <C-f> :CtrlP .<CR>
" C-/ to hide search results
map <C-_> :noh<CR>
" fzf
map <C-f> :Files<CR>
map <C-g> :GFiles<CR>
command! -bang -nargs=* GGrep
\ call fzf#vim#grep(
\ 'git grep --line-number -- '.shellescape(<q-args>), 0,
\ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0)
map <C-s> :GGrep<CR>
" git
map <leader>gs :Git status<CR>
map <leader>gb :Git blame<CR>
map <C-s> :Git grep
" other
map <C-_> :noh<CR>
fun! TrimWhitespace()
let l:save = winsaveview()