fzf: Add DEFAULT_COMMAND and vim :Files mapping
Add FZF_DEFAULT_COMMAND that displays hidden files as well, but ignores .git directories. Add :Files mapping in vim. Because it is bound to <leader>f, the leader key mapping had to be moved to the top of the file.
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
" Set leader key
|
||||||
|
let mapleader = "\<Space>"
|
||||||
|
|
||||||
" Plugins ######################################################################
|
" Plugins ######################################################################
|
||||||
" Auto completion
|
" Auto completion
|
||||||
" needs vim >= 8.1.1719 to support features like popup and text property.
|
" needs vim >= 8.1.1719 to support features like popup and text property.
|
||||||
@@ -10,6 +13,7 @@ packadd! delimitMate
|
|||||||
" Fuzzy finder
|
" Fuzzy finder
|
||||||
packadd! fzf
|
packadd! fzf
|
||||||
packadd! fzf.vim
|
packadd! fzf.vim
|
||||||
|
nmap <leader>f :Files<CR>
|
||||||
" Theme
|
" Theme
|
||||||
packadd! onedark.vim
|
packadd! onedark.vim
|
||||||
" Git information
|
" Git information
|
||||||
@@ -83,8 +87,6 @@ set list
|
|||||||
set listchars=tab:>·
|
set listchars=tab:>·
|
||||||
|
|
||||||
" Keybindings ##################################################################
|
" Keybindings ##################################################################
|
||||||
" Set leader key
|
|
||||||
let mapleader = "\<Space>"
|
|
||||||
" Stop highlighting search result when pressing Return
|
" Stop highlighting search result when pressing Return
|
||||||
nnoremap <silent> <CR> :nohlsearch<CR><CR>
|
nnoremap <silent> <CR> :nohlsearch<CR><CR>
|
||||||
|
|
||||||
|
|||||||
@@ -56,5 +56,9 @@ else
|
|||||||
export LESS_TERMCAP_us=$'\e[1;4;31m'
|
export LESS_TERMCAP_us=$'\e[1;4;31m'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Show also hidden files per default but ignore files in '.git' directories.
|
||||||
|
FZF_DEFAULT_COMMAND="find . -name '.git' -prune -o \( -type f -a -print \)"
|
||||||
|
export FZF_DEFAULT_COMMAND
|
||||||
|
|
||||||
# Automatically start X on login after boot.
|
# Automatically start X on login after boot.
|
||||||
[[ -n $DISPLAY || $XDG_VTNR -ne 1 ]] || exec startx
|
[[ -n $DISPLAY || $XDG_VTNR -ne 1 ]] || exec startx
|
||||||
|
|||||||
Reference in New Issue
Block a user