Skip to content

Commit

Permalink
Work around of preview window wrong highlighting color in bat sharkdp…
Browse files Browse the repository at this point in the history
  • Loading branch information
app committed Oct 11, 2021
1 parent 8c5c707 commit a7885af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rc.d/fzf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ if has_key(plugs, 'fzf')
command! -bang -nargs=* GGrep
\ call fzf#vim#grep(
\ 'git grep --line-number '.shellescape(<q-args>), 0,
\ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0)
\ {'options':['--preview', 'bat --color=always --theme="Solarized (dark)" --style=numbers -H {2} --line-range :500 {1}| sed s/"48;2;28;209;255"/"4;2;28;209;255"/g']}, <bang>0)

command! -bang -nargs=? -complete=dir Buffers
\ call fzf#vim#buffers({'options': ['--layout=reverse', '--info=inline',
\ '--preview', 'bat {4} -H {2} --color=always --theme="Solarized (dark)" --style=numbers --line-range :500|sed s/"48;2;28;209;255"/"4;2;28;209;255"/g']}, <bang>0)

function! SearchWordWithAg()
execute 'Ag' expand('<cword>')
Expand Down

0 comments on commit a7885af

Please sign in to comment.