mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 19:15:37 +00:00
more fzf tweaks
This commit is contained in:
parent
751148f38e
commit
1b619d9dfc
@ -42,7 +42,8 @@ if status --is-interactive
|
|||||||
|
|
||||||
# Fuzzy finder
|
# Fuzzy finder
|
||||||
fzf_key_bindings
|
fzf_key_bindings
|
||||||
set -g FZF_DEFAULT_COMMAND 'fd --type file --hidden'
|
set -g FZF_DEFAULT_COMMAND 'fd --type file'
|
||||||
|
set -g FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
|
||||||
set -g FZF_DEFAULT_OPTS '-m --height 50% --border'
|
set -g FZF_DEFAULT_OPTS '-m --height 50% --border'
|
||||||
|
|
||||||
# Use `starship` prompt
|
# Use `starship` prompt
|
||||||
|
@ -13,6 +13,11 @@ function gittools
|
|||||||
and git checkout $branch
|
and git checkout $branch
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function git-show-fuzzy
|
||||||
|
set commit (git log --pretty=oneline | fzf | cut -d' ' -f1)
|
||||||
|
and git show $commit
|
||||||
|
end
|
||||||
|
|
||||||
function git-merge-fuzzy
|
function git-merge-fuzzy
|
||||||
set branch (git-fuzzy-branch "merge from...")
|
set branch (git-fuzzy-branch "merge from...")
|
||||||
and git merge $branch
|
and git merge $branch
|
||||||
@ -33,6 +38,8 @@ function gittools
|
|||||||
switch $argv[1]
|
switch $argv[1]
|
||||||
case "checkout"
|
case "checkout"
|
||||||
git-checkout-fuzzy
|
git-checkout-fuzzy
|
||||||
|
case "show"
|
||||||
|
git-show-fuzzy
|
||||||
case "merge"
|
case "merge"
|
||||||
git-merge-fuzzy
|
git-merge-fuzzy
|
||||||
case "branch"
|
case "branch"
|
||||||
|
@ -134,7 +134,7 @@ nnoremap <Leader>gp :Git push<cr>
|
|||||||
nnoremap <Leader>wm :only<cr>
|
nnoremap <Leader>wm :only<cr>
|
||||||
|
|
||||||
" Open file tree
|
" Open file tree
|
||||||
noremap <silent> <Leader>t :Fern . -drawer -width=35 -toggle<CR><C-w>=
|
noremap <silent> <Leader>ft :Fern . -drawer -width=35 -toggle<CR><C-w>=
|
||||||
|
|
||||||
" CoC Settings
|
" CoC Settings
|
||||||
"-------------
|
"-------------
|
||||||
|
Loading…
Reference in New Issue
Block a user