Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
vim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dotfiles
vim
Commits
6edeceef
Commit
6edeceef
authored
Nov 13, 2020
by
Henrik Tjäder
Browse files
Options
Downloads
Patches
Plain Diff
Setup bat theme and test some skim configs
parent
9971254a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.vimrc
+35
-2
35 additions, 2 deletions
.vimrc
with
35 additions
and
2 deletions
.vimrc
+
35
−
2
View file @
6edeceef
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment