mirror of
https://gitlab.com/sagidayan/linux-config.git
synced 2024-11-25 08:45:24 +00:00
Fix for vim fzf after the move to manually intalling fzf
Also added a `gitB` function for selecting branches from a list
This commit is contained in:
parent
443f4b1c5e
commit
47b2c0f476
2 changed files with 15 additions and 0 deletions
|
@ -38,6 +38,20 @@ export EDITOR=vim;
|
|||
# Shell functions
|
||||
############################################
|
||||
|
||||
function gitB() {
|
||||
if [ -d ./.git ]; then
|
||||
BRANCH=$(git branch -l | fzf --reverse --header="Select Branch to checkout")
|
||||
if [ -z ${BRANCH} ]; then
|
||||
echo Canceled
|
||||
else
|
||||
git ck ${BRANCH}
|
||||
fi
|
||||
else
|
||||
echo "[ERROR]: Not in a git repository"
|
||||
fi;
|
||||
}
|
||||
|
||||
|
||||
function huh() {
|
||||
CURRENT_DIR=$(echo "${PWD##*/}")
|
||||
TITLE="${1:=$CURRENT_DIR}"
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
Plug 'tpope/vim-fugitive' " git wrapper
|
||||
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } " golang plugin for vim
|
||||
Plug 'Yggdroot/indentLine' " Indentation LInes
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " Install fzf
|
||||
Plug 'junegunn/fzf.vim' " Fuzzy search
|
||||
Plug 'francoiscabrol/ranger.vim' " Ranger <leader>f
|
||||
Plug 'scrooloose/nerdtree' " NerdTree - File tree (ctr-n)
|
||||
|
|
Loading…
Reference in a new issue