Skip to content

Commit 95539e8

Browse files
Added fzf.vim
1 parent a276266 commit 95539e8

File tree

1 file changed

+36
-6
lines changed

1 file changed

+36
-6
lines changed

.vimrc

+36-6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ filetype off " required
33

44
" set the runtime path to include Vundle and initialize
55
set rtp+=~/.vim/bundle/Vundle.vim
6+
set rtp+=~/.fzf
67

78
call vundle#begin()
89
" alternatively, pass a path where Vundle should install plugins
@@ -18,7 +19,7 @@ Plugin 'scrooloose/nerdtree'
1819
Plugin 'scrooloose/syntastic'
1920
Plugin 'scrooloose/nerdcommenter'
2021
" Plugin 'kien/ctrlp.vim'
21-
Plugin 'bling/vim-airline'
22+
Plugin 'vim-airline/vim-airline'
2223
Plugin 'vim-airline/vim-airline-themes'
2324
Plugin 'airblade/vim-gitgutter'
2425
Plugin 'majutsushi/tagbar'
@@ -28,7 +29,7 @@ Plugin 'morhetz/gruvbox'
2829
Plugin 'junegunn/goyo.vim'
2930
Plugin 'tomasr/molokai'
3031
Plugin 'lifepillar/vim-mucomplete'
31-
" Plugin 'junegunn/fzf'
32+
Plugin 'junegunn/fzf.vim'
3233
" Plugin 'yggdroot/indentline'
3334
" plugin from http://vm-scripts.org/vim/scripts.html
3435
" Plugin 'L9'
@@ -62,7 +63,7 @@ filetype plugin indent on " required
6263
let g:airline_powerline_fonts=1
6364

6465
" AirlineTheme config
65-
let g:airline_theme='wombat'
66+
let g:airline_theme='ubaryd'
6667

6768
" Signify config
6869
let g:signify_vcs_list=['git']
@@ -79,12 +80,17 @@ let g:tagbar_ctags_bin="/usr/local/bin/ctags"
7980
set number "relativenumber
8081
set textwidth=99
8182
"set colorcolumn=101
82-
set softtabstop=4 shiftwidth=4 expandtab
83+
set softtabstop=2 shiftwidth=2 expandtab
8384
set background=dark
8485
set title
8586
set hlsearch
87+
88+
" Auto indent when copy pasting
89+
set pastetoggle=<F3>
90+
8691
"set cursorline
8792
set clipboard=unnamed
93+
set showcmd
8894

8995
" Fuzzy file built-in
9096
set path+=**
@@ -95,6 +101,27 @@ set wildignore+=*/min/*,*/vendor/*,*/node_modules/*,*/bower_components/*,*/stora
95101
set completeopt+=menuone,noselect
96102
let g:mucomplete#enable_auto_at_startup=1
97103

104+
" Default fzf layout
105+
" - down / up / left / right
106+
let g:fzf_layout = { 'down': '~40%' }
107+
let $FZF_DEFAULT_COMMAND=' (git ls-tree -r --name-only HEAD || find . -path "*/\.*" -prune -o -type f -print -o -type l -print | sed s/^..//) 2> /dev/null'
108+
109+
" Customize fzf colors to match your color scheme
110+
let g:fzf_colors =
111+
\ { 'fg': ['fg', 'Normal'],
112+
\ 'bg': ['bg', 'Normal'],
113+
\ 'hl': ['fg', 'Comment'],
114+
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
115+
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
116+
\ 'hl+': ['fg', 'Statement'],
117+
\ 'info': ['fg', 'PreProc'],
118+
\ 'border': ['fg', 'Ignore'],
119+
\ 'prompt': ['fg', 'Conditional'],
120+
\ 'pointer': ['fg', 'Exception'],
121+
\ 'marker': ['fg', 'Keyword'],
122+
\ 'spinner': ['fg', 'Label'],
123+
\ 'header': ['fg', 'Comment'] }
124+
98125
" let dimension=&colorcolumn + 5
99126
"
100127
" " Indent config
@@ -123,9 +150,9 @@ else
123150
" colorscheme dracula
124151
endif
125152

126-
au BufRead, BufNewFile *.vue set filetype=vue
153+
au BufRead,BufNewFile *.vue set filetype=html
127154
autocmd FileType html setlocal shiftwidth=2 tabstop=2
128-
autocmd FileType vue setlocal shiftwidth=4 tabstop=4
155+
autocmd FileType vue setlocal shiftwidth=2 tabstop=2
129156
"Allow transparent bg
130157
"autocmd ColorScheme * highlight Normal ctermbg=None
131158

@@ -137,6 +164,9 @@ syntax enable
137164
" colorscheme solarized
138165
colorscheme molokai
139166

167+
" FZF Key Bindings
168+
nmap <C-P> :Files<CR>
169+
140170
" Key Bindings
141171
nmap <F7> :NERDTreeToggle<CR>
142172
nmap <F8> :TagbarToggle<CR>

0 commit comments

Comments
 (0)