Skip to content

Commit

Permalink
Add FZF fuzzy file finder.
Browse files Browse the repository at this point in the history
  • Loading branch information
akash0x53 committed Jun 18, 2020
1 parent 74feb1a commit 5473b85
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
#export LIBGL_ALWAYS_SOFTWARE=1

#FZF options
export FZF_DEFAULT_OPTS="--height 100% --layout=reverse --border --preview \
'head -100 {}' --info=inline"
export FZF_DEFAULT_COMMAND="ag --literal --files-with-matches --nocolor \
--hidden -g "" --ignore '.git'"


#hour=$(date +%H)
#if (($hour > 18));then
Expand Down
2 changes: 2 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ link_file()

#-------- install required tools -------
sudo apt install xsel $> /dev/null
sudo apt install fzf
sudo apt install silversearcher-ag #the_silver_searcher for Mac


#----------- setup gitconfig -----------
Expand Down
5 changes: 4 additions & 1 deletion vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Plug 'gruvbox-community/gruvbox'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'sheerun/vim-polyglot'
Plug 'preservim/nerdtree'
"Plug 'kien/ctrlp'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
call plug#end()

"---------- Appearance ----------
Expand Down Expand Up @@ -59,7 +61,7 @@ set softtabstop=4 "remove tab by backspace even expandtab set

"tab-spaces visualisation
set list
set listchars=tab:>-
set listchars=tab:>·,trail:·
set textwidth=79 "wrap after 79 char

filetype indent on "load file type specific indent files from ~/.vim/indent/XXX.vim
Expand All @@ -86,6 +88,7 @@ else
endif
noremap <leader>p :botright terminal ++close ++rows=10 python<CR>
map <C-n> :NERDTreeToggle<CR>
map <C-p> :FZF<CR>
"----------- On Startup -----------
autocmd StdinReadPre * let s:std_in=1
Expand Down

0 comments on commit 5473b85

Please sign in to comment.