mirror of
https://github.com/anthonyoteri/dotfiles.git
synced 2026-06-05 23:56:52 -04:00
Add neo-vim configuration
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'stsewd/fzf-checkout.vim'
|
||||
|
||||
let g:fzf_layout = { 'up': '~90%', 'window': { 'width': 0.8, 'height': 0.8, 'yoffset':0.5, 'xoffset': 0.5 } }
|
||||
let $FZF_DEFAULT_OPTS = '--layout=reverse --info=inline'
|
||||
|
||||
" Customise the Files command to use rg which respects .gitignore files
|
||||
command! -bang -nargs=? -complete=dir Files
|
||||
\ call fzf#run(fzf#wrap('files', fzf#vim#with_preview({ 'dir': <q-args>, 'sink': 'e', 'source': 'rg --files --hidden' }), <bang>0))
|
||||
|
||||
" Add an AllFiles variation that ignores .gitignore files
|
||||
command! -bang -nargs=? -complete=dir AllFiles
|
||||
\ call fzf#run(fzf#wrap('allfiles', fzf#vim#with_preview({ 'dir': <q-args>, 'sink': 'e', 'source': 'rg --files --hidden --no-ignore' }), <bang>0))
|
||||
|
||||
nmap <leader>f :Files<cr>
|
||||
nmap <leader>F :AllFiles<cr>
|
||||
nmap <leader>b :Buffers<cr>
|
||||
nmap <leader>h :History<cr>
|
||||
nmap <leader>r :Rg<cr>
|
||||
nmap <leader>R :Rg<space>
|
||||
nmap <leader>gb :GBranches<cr>
|
||||
Reference in New Issue
Block a user