-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
34 lines (29 loc) · 1.09 KB
/
vimrc
File metadata and controls
34 lines (29 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
syntax on
autocmd BufWritePre * %s/\s\+$//e
function! s:SourceConfigFilesIn(directory)
let directory_splat = '~/.vim/' . a:directory . '/*'
for config_file in split(glob(directory_splat), '\n')
if filereadable(config_file)
execute 'source' config_file
endif
endfor
endfunction
call s:SourceConfigFilesIn('rcconfig')
call plug#begin('~/.vim/plugged')
call s:SourceConfigFilesIn('plugins')
call plug#end()
" Preview in :Ag
" command! -bang -nargs=* Ag
" \ call fzf#vim#ag(<q-args>,
" \ <bang>0 ? fzf#vim#with_preview({'options': '--delimiter : --nth 4..'}, 'up:60%')
" \ : fzf#vim#with_preview({'options': '--delimiter : --nth 4..'}, 'right:50%:hidden', '?'),
" \ <bang>0)
"
command! -bang -nargs=* Ag
\ call fzf#vim#ag(<q-args>,
\ <bang>0 ? fzf#vim#with_preview('up:60%')
\ : fzf#vim#with_preview('right:50%:hidden', '?'),
\ <bang>0)
" Preview in :Files
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0)