From bd28feb6b8b60bb584a06743536e6b1044d11832 Mon Sep 17 00:00:00 2001 From: Mahesh Asolkar Date: Sat, 10 Apr 2021 20:07:26 -0700 Subject: [PATCH] Nvim support changes --- minimal.vimrc.vim | 20 ++++++++++++++------ user.bash_aliases | 9 ++++++--- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/minimal.vimrc.vim b/minimal.vimrc.vim index cc89929..a9aebc0 100644 --- a/minimal.vimrc.vim +++ b/minimal.vimrc.vim @@ -10,12 +10,20 @@ " * Launch vim and run :PluginInstall " * To install from command line: vim +PluginInstall +qall -" Vundle Installation {{{ - " Bootstrap Vundle if it's not installed - if empty(glob("~/.vim/autoload/plug.vim")) - echo "No vim-plug, getting it ..." - execute '!curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' - echo "Getting vim-plug ... done" +" Plug Installation {{{ + " Bootstrap Plug if it's not installed + if has("nvim") + if empty(glob("~/.config/nvim/autoload/plug.vim")) + echo "No vim-plug, getting it ..." + execute '!curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + echo "Getting vim-plug ... done" + endif + else + if empty(glob("~/.vim/autoload/plug.vim")) + echo "No vim-plug, getting it ..." + execute '!curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + echo "Getting vim-plug ... done" + endif endif " }}} diff --git a/user.bash_aliases b/user.bash_aliases index 755b29e..8eb05d5 100644 --- a/user.bash_aliases +++ b/user.bash_aliases @@ -1,11 +1,14 @@ # -------------------------------- # Shell RC # -------------------------------- +# If git-prompt does not exist, get it with following command: +# +# $ wget https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh if [ -f /etc/bash_completion.d/git-prompt ]; then source /etc/bash_completion.d/git-prompt fi -if [ -f ~/git-prompt.sh ]; then - source ~/git-prompt.sh +if [ -f ~/bin/git-prompt.sh ]; then + source ~/bin/git-prompt.sh fi export GIT_PS1_SHOWDIRTYSTATE=1 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;92m\]$(hostname)\[\033[01;34m\] \w\[\033[01;35m\]$(__git_ps1 "  %s") \[\033[0m\]$ ' @@ -14,7 +17,6 @@ PS1='${debian_chroot:+($debian_chroot)}\[\033[01;92m\]$(hostname)\[\033[01;34m\] # Variables # export EDITOR=vim -export GOPATH=~/lang/go export PATH=~/bin:$PATH # @@ -25,6 +27,7 @@ alias q=exit alias a=clear alias h=history alias e=$EDITOR +alias n=nvim # # Functions