mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
chore(nvim): add fzf plugin, configuration, and mappings
This commit is contained in:
@@ -208,6 +208,7 @@ endif
|
|||||||
call plug#begin(data_dir . '/plugins')
|
call plug#begin(data_dir . '/plugins')
|
||||||
|
|
||||||
source ~/.config/nvim/plugins/base16-vim.vim
|
source ~/.config/nvim/plugins/base16-vim.vim
|
||||||
|
source ~/.config/nvim/plugins/fzf.vim
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
doautocmd User PlugLoaded
|
doautocmd User PlugLoaded
|
||||||
|
|||||||
23
nvim/plugins/fzf.vim
Normal file
23
nvim/plugins/fzf.vim
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
" A command-line fuzzy finder
|
||||||
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||||
|
Plug 'junegunn/fzf.vim'
|
||||||
|
|
||||||
|
" Key bindings
|
||||||
|
let g:fzf_action = {
|
||||||
|
\ 'ctrl-t': 'tab split',
|
||||||
|
\ 'ctrl-x': 'split',
|
||||||
|
\ 'ctrl-v': 'vsplit' }
|
||||||
|
|
||||||
|
" Popup window centered on the screen
|
||||||
|
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } }
|
||||||
|
|
||||||
|
" Enable per-command history
|
||||||
|
let g:fzf_history_dir = '~/.local/share/fzf-history'
|
||||||
|
|
||||||
|
" Mappings
|
||||||
|
map <C-f> :Files<CR>
|
||||||
|
map <leader>b :Buffers<CR>
|
||||||
|
nnoremap <leader>r :Rg<CR>
|
||||||
|
nnoremap <leader>gs :GFiles?<CR>
|
||||||
|
nnoremap <leader>t :Tags<CR>
|
||||||
|
nnoremap <leader>m :Marks<CR>
|
||||||
Reference in New Issue
Block a user