Skip to content
Snippets Groups Projects
Commit 6edeceef authored by Henrik Tjäder's avatar Henrik Tjäder
Browse files

Setup bat theme and test some skim configs

parent 9971254a
No related branches found
No related tags found
No related merge requests found
......@@ -282,6 +282,21 @@ if &diff
colorscheme sol
endif
" handling setting and unsetting BAT_THEME for fzf.vim
augroup update_bat_theme
autocmd!
autocmd colorscheme * call ToggleBatEnvVar()
augroup end
function ToggleBatEnvVar()
if (&background == "light")
let $BAT_THEME='GitHub'
else
let $BAT_THEME=''
endif
endfunction
" Molokai attempt to use 256-color
let g:rehash256 = 1
......@@ -919,6 +934,7 @@ map <C-g> <Esc><Esc>:BCommits!<CR>
"<C-v> new vertical split
" Customize fzf colors to match your color scheme
" Replaced by bat theme
let g:skim_colors =
\ { 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
......@@ -934,9 +950,8 @@ let g:skim_colors =
\ 'spinner': ['fg', 'Label'],
\ 'header': ['fg', 'Comment'] }
" Enable Ag and Rg for skim plugin
command! -bang -nargs=* Ag call fzf#vim#ag_interactive(<q-args>, fzf#vim#with_preview('right:50%:hidden', 'alt-h'))
"command! -bang -nargs=* Ag call fzf#vim#ag_interactive(<q-args>, fzf#vim#with_preview('right:50%:hidden', 'alt-h'))
"command! -bang -nargs=* Rg call fzf#vim#rg_interactive(<q-args>, fzf#vim#with_preview('right:50%:hidden', 'alt-h'))
"command! -bang -nargs=* Rg call fzf#vim#rg_interactive(<q-args>, fzf#vim#with_preview())
command! -bang -nargs=* RG
......@@ -948,6 +963,24 @@ command! -bang -nargs=* Rg
\ 'rg -g!target -g!book -g!docs --column --line-number --no-heading --smart-case -- '.shellescape(<q-args>), 1,
\ fzf#vim#with_preview(), <bang>0)
" Similarly, we can apply it to fzf#vim#grep. To use ripgrep instead of ag:
command! -bang -nargs=* Rgg
\ call fzf#vim#grep(
\ 'rg --column --line-number --no-heading --color=always '.shellescape(<q-args>), 1,
\ <bang>0 ? fzf#vim#with_preview('up:60%')
\ : fzf#vim#with_preview('right:50%:hidden', '?'),
\ <bang>0)
" Command for git grep
" - fzf#vim#grep(command, with_column, [options], [fullscreen])
command! -bang -nargs=* GGrep
\ call fzf#vim#grep('git grep --line-number '.shellescape(<q-args>), 0, <bang>0)
" [[B]Commits] Customize the options used by 'git log':
"let g:fzf_commits_log_options = '--graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr"'
let g:fzf_commits_log_options = '--graph --date=short --color=always --format="%C(auto)%h %ad | %s%d [%an] %C(black)%C(bold)%cr"'
" Mapping selecting mappings
nmap <leader><tab> <plug>(fzf-maps-n)
xmap <leader><tab> <plug>(fzf-maps-x)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment