From 862ef61d7f2e1b6b620dff34f5f83dd4a815794e Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Wed, 4 Nov 2020 15:21:29 +0800 Subject: [PATCH] [feature] gco for `git checkout`, gsc for `git switch -c` --- nvim/config/init.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nvim/config/init.vim b/nvim/config/init.vim index 83b462f..990f825 100644 --- a/nvim/config/init.vim +++ b/nvim/config/init.vim @@ -171,12 +171,14 @@ nnoremap gl :Glog nnoremap gms :Gvdiffsplit! nnoremap gmh :diffget //2 nnoremap gml :diffget //3 +nnoremap gsc :exec "!git switch -c " . input("Enter new branch name:") " ==== ctrlp configuration ==== "let g:ctrlp_user_command = ['.git', 'git ls-files -co --exclude-standard'] " ==== fzf configuration ==== nnoremap :FZF +nnoremap gco :call fzf#run({'source': 'git branch \| cut -c 3-', 'sink': '!git checkout'}) " ==== gruvbox configuration ====