1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-22 03:21:30 +01:00

vim: replace CTRLP with fzf.vim

- add fzf.vim
- Remove ack plugin (use :Rg instead)
This commit is contained in:
bretello 2021-09-30 12:41:07 +02:00
parent 266b121d68
commit 55ca57247d
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
3 changed files with 19 additions and 34 deletions

View File

@ -1,6 +1,4 @@
"""" PLUGINS CONFIGURATION """" PLUGINS CONFIGURATION
let g:ack_default_options = " --cc --cpp --shell --python --html --js --vue --rust --yaml"
" ALE configuration " ALE configuration
let g:ale_set_balloons = 1 " enable tooltips let g:ale_set_balloons = 1 " enable tooltips
let g:ale_fixers = { let g:ale_fixers = {
@ -145,13 +143,6 @@ let g:indent_guides_start_level = 2
let g:indent_guides_guide_size = 1 let g:indent_guides_guide_size = 1
" let g:ctrlp_custom_ignore = {
" \ 'dir': '\v(target|build|dist|.venv)$',
" \ 'file': '\v\.(exe|so|dll)$',
" \ 'link': 'some_bad_symbolic_links',
" \ }
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard']
"" Gutentags" "" Gutentags"
let g:gutentags_cache_dir = expand('~/.vim/ctags_cache/') let g:gutentags_cache_dir = expand('~/.vim/ctags_cache/')
@ -161,8 +152,9 @@ let g:gutentags_file_list_command = {
\ '.hg': 'hg files', \ '.hg': 'hg files',
\ }, \ },
\ } \ }
let g:gutentags_generate_on_empty_buffer = 1
let g:gutentags_ctags_exclude = ['build', 'dist', '*css', '*json', '*yaml', '*md'] let g:gutentags_ctags_exclude = ['build', 'dist', '*css', '*json', '*yaml', '*md']
let g:gutentags_ctags_extra_args = ['--tag-relative=always', ]
"" nerdtree "" nerdtree
let NERDTreeIgnore=['__pycache__'] let NERDTreeIgnore=['__pycache__']
@ -174,10 +166,6 @@ let g:snipMate.description_in_completion = 1
let g:ackprg = 'rg --vimgrep --no-heading' let g:ackprg = 'rg --vimgrep --no-heading'
"" Quickpeek
" Automatically open the quickpeek window
let g:quickpeek_auto = v:true
"" Fzf "" Fzf
let g:fzf_layout = { 'down': '~40%' }" let g:fzf_layout = { 'down': '~40%' }"

View File

@ -15,10 +15,6 @@ Plug 'https://github.com/morhetz/gruvbox'
Plug 'https://github.com/chrisbra/csv.vim' Plug 'https://github.com/chrisbra/csv.vim'
" Asynchronous Linting Engine " Asynchronous Linting Engine
Plug 'https://github.com/dense-analysis/ale' Plug 'https://github.com/dense-analysis/ale'
" Open files/recent files/tags quickly
Plug 'https://github.com/ctrlpvim/ctrlp.vim'
" Ctrlp requires gutentags
Plug 'https://github.com/ludovicchabant/vim-gutentags.git'
" Git " Git
Plug 'https://github.com/tpope/vim-fugitive' Plug 'https://github.com/tpope/vim-fugitive'
" Comment shit easily " Comment shit easily
@ -33,8 +29,6 @@ Plug 'https://github.com/jiangmiao/auto-pairs'
Plug 'https://github.com/amix/open_file_under_cursor.vim' Plug 'https://github.com/amix/open_file_under_cursor.vim'
" Multi cursor " Multi cursor
Plug 'https://github.com/mg979/vim-visual-multi' Plug 'https://github.com/mg979/vim-visual-multi'
" Search
Plug 'https://github.com/mileszs/ack.vim'
" Yank history " Yank history
Plug 'https://github.com/maxbrunsfeld/vim-yankstack' Plug 'https://github.com/maxbrunsfeld/vim-yankstack'
" Mark indentation level " Mark indentation level
@ -43,12 +37,11 @@ Plug 'https://github.com/nathanaelkane/vim-indent-guides'
" Meson + Ninja " Meson + Ninja
Plug 'https://github.com/igankevich/mesonic' Plug 'https://github.com/igankevich/mesonic'
if g:uname == "Darwin" " fzf
" mac Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug '/usr/local/opt/fzf' Plug 'junegunn/fzf.vim'
elseif g:uname == "Linux" " Open tags with fzf's :Tags
Plug '/usr/bin/fzf' Plug 'https://github.com/ludovicchabant/vim-gutentags.git'
end
" snipmate " snipmate
Plug 'https://github.com/MarcWeber/vim-addon-mw-utils' Plug 'https://github.com/MarcWeber/vim-addon-mw-utils'

View File

@ -53,7 +53,7 @@ nnoremap <leader>wz :call WinZoomToggle()<CR>
nnoremap <leader>C :close<CR> nnoremap <leader>C :close<CR>
nnoremap <leader>B :Bclose<CR> nnoremap <leader>B :Bclose<CR>
nnoremap <leader>k :LAck<Space> nnoremap <leader>k :Rg<CR>
"" Fugitive "" Fugitive
nnoremap <leader>/ :0Git<CR> nnoremap <leader>/ :0Git<CR>
@ -86,19 +86,23 @@ nmap <leader>n :ALEFindReferences -relative<CR>
nmap <leader>h :ALEHover<CR> nmap <leader>h :ALEHover<CR>
nmap <leader>r :ALERename<CR> nmap <leader>r :ALERename<CR>
nmap <leader>` :ALELint<CR> nmap <leader>` :ALELint<CR>
nmap <leader>F :ALEFix<CR>
map <leader>nn :NERDTreeToggle<CR> map <leader>nn :NERDTreeToggle<CR>
"" CtrlP "" fzf.vim
" Quickly find and open a recently opened file " Quickly find and open a recently opened file
map <leader>o :CtrlPBuffer<CR> map <leader>o :Buffers<CR>
map <leader>j :call fzf#run({'sink': 'edit', 'options': '--preview="BAT_STYLE=header,changes bat --color=always {}"', 'down': '40%'}) <CR> map <leader>j :GFiles<CR>
map <leader>J :Files<CR>
map <leader>f :CtrlPMRUFiles<CR> map <leader>f :History<CR>
map <leader>T :CtrlPBufTag<CR> map <leader>T :BTags<CR>
map <leader>t :CtrlPTag<CR> map <leader>t :Tags<CR>
map <leader>l :CtrlPLine<CR> map <leader>l :Lines<CR>
map <leader>c :CtrlPQuickfix<CR> map <leader>c :CtrlPQuickfix<CR>
map <leader>s :Snippets<CR>
map <leader>; :Commands<CR>
"" CSV "" CSV
" highlight current column " highlight current column