From 4a94bedfb0cea052216e753e24c922f5999e7702 Mon Sep 17 00:00:00 2001 From: Marcel Schneider Date: Sun, 22 Oct 2017 18:28:27 +0200 Subject: [PATCH] switch from ctrl-p to fzf --- vimrc.symlink | 6 +++++- zsh/custom.zsh | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/vimrc.symlink b/vimrc.symlink index b59c450..4943969 100644 --- a/vimrc.symlink +++ b/vimrc.symlink @@ -17,7 +17,6 @@ Plug 'tpope/vim-fugitive' Plug 'tpope/vim-sensible' Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': 'NERDTreeToggle' } -Plug 'kien/ctrlp.vim' Plug 'scrooloose/nerdcommenter' "Plug 'myusuf3/numbers.vim' Plug 'Shougo/neocomplete.vim' @@ -33,6 +32,7 @@ Plug 'altercation/vim-colors-solarized' Plug 'godlygeek/tabular' " Align text on symbols Plug 'szw/vim-tags' , { 'for' : 'php' } " tags support Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } " fuzzy file finder +Plug 'junegunn/fzf.vim' " vim integration for fzf Plug 'airblade/vim-gitgutter' " git status in gutter column " html / templates @@ -139,6 +139,10 @@ let mapleader = "," " CtrlP for Tags nnoremap :CtrlPTag +" fzf bindings +nmap :Files +nmap :Tags + " Toggle NERDTree nmap k :NERDTreeToggle " expand to the path of the file in the current buffer diff --git a/zsh/custom.zsh b/zsh/custom.zsh index 1d18dd0..64c20d4 100644 --- a/zsh/custom.zsh +++ b/zsh/custom.zsh @@ -13,3 +13,9 @@ if hash gulp 2&> /dev/null; then eval "$(gulp --completion=zsh)" fi +# fzf settings +if hash ag 2&> /dev/null; then + # Use ag instead of find and exclude .gitignored files + export FZF_DEFAULT_COMMAND='ag -g ""' + export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" +fi