forked from mutewinter/dot_vim
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfzf.vim
69 lines (60 loc) · 2.14 KB
/
fzf.vim
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
if exists('g:plug_loading_plugins')
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
finish
endif
let g:fzf_command_prefix = 'Fzf'
let g:fzf_layout = { 'window': '15split enew' }
" Disable preview window
let g:fzf_preview_window = []
" Leader Commands
if exists('g:vscode')
nnoremap <silent> <C-p> :<C-u>call VSCodeNotify('workbench.action.quickOpen')<CR>
else
nnoremap <c-p> :FzfFiles<CR>
endif
nnoremap <leader>t :FzfTags<CR>
nnoremap <leader>b :FzfBuffers<CR>
nnoremap <leader>h :FzfHistory<CR>
function! s:fzf_statusline()
" zenfly
" highlight fzf1 guifg=#000000 guibg=NONE
" highlight fzf2 guifg=#000000 guibg=NONE
" highlight fzf3 guifg=#000000 guibg=NONE
highlight fzf1 guifg=#FFFFFF guibg=NONE
highlight fzf2 guifg=#FFFFFF guibg=NONE
highlight fzf3 guifg=#FFFFFF guibg=NONE
setlocal statusline=%#fzf1#\ >\ %#fzf2#fz%#fzf3#f
" setlocal statusline=%#fzf2#
endfunction
autocmd! User FzfStatusLine call <SID>fzf_statusline()
if (&background == "light")
let g:fzf_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
\ 'hl': ['fg', 'Search'],
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
\ 'hl+': ['fg', 'Title'],
\ 'info': ['fg', 'PreProc'],
\ 'prompt': ['fg', 'Conditional'],
\ 'pointer': ['fg', 'Exception'],
\ 'marker': ['fg', 'Keyword'],
\ 'spinner': ['fg', 'Label'],
\ 'header': ['fg', 'Comment'] }
else
let g:fzf_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
\ 'hl': ['bg', 'Search'],
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
\ 'hl+': ['fg', 'Title'],
\ 'info': ['fg', 'PreProc'],
\ 'prompt': ['fg', 'Conditional'],
\ 'pointer': ['fg', 'Exception'],
\ 'marker': ['fg', 'Keyword'],
\ 'spinner': ['fg', 'Label'],
\ 'header': ['fg', 'Comment'] }
endif
let g:fzf_commits_log_options = "--graph --pretty=format:'%Cred%h%Creset %C(bold blue)<%an>%Creset %Cgreen(%cr)%C(yellow)%d%Creset%n%s'"