commit 8b51d99ce0ff5e329973c6a66c9116527b0348e9
parent caf10f8c7fb77709399c6f8793948f51b803a21a
Author: Bharatvaj H <bharatvaj@yahoo.com>
Date: Sun, 1 Aug 2021 01:11:55 +0530
Moved git-prompt to .config and sourcing from .bashrc to avoid errors
Added automatic plugin installation of vim
Diffstat:
4 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/.bashrc b/.bashrc
@@ -2,6 +2,9 @@
# ~/.bashrc
#
+# Make `history` print timestamp
+HISTTIMEFORMAT="%F %T "
+
PATH_EXPORTS=( "${ESSENTIAL_PATH_EXPORTS[@]}" "${OTHER_PATH_EXPORTS[@]}" )
# Include one by one even if it affects performance
@@ -10,3 +13,12 @@ for PATH_EXPORT in ${PATH_EXPORTS}; do
export PATH="$WASMTIME_HOME/bin:$PATH"
done
+# Git
+if [ -f ~/.config/.git-prompt.sh ]; then
+ . "${HOME}/.config/.git-prompt.sh"
+ export GIT_PS1_SHOWCOLORHINTS=1
+ export GIT_PS1_SHOWDIRTYSTATE=1
+ export GIT_PS1_SHOWUPSTREAM="auto"
+ export PROMPT_COMMAND='__git_ps1 "" " \w \\\$ "'
+fi
+
diff --git a/.git-prompt.sh b/.config/.git-prompt.sh
diff --git a/.profile b/.profile
@@ -2,15 +2,6 @@ alias ls='ls -G'
export GREP_OPTIONS='--color=auto'
export GREP_COLOR='1;35;40'
-# Git
-if [ -f ~/.git-prompt.sh ]; then
- . ~/.git-prompt.sh
- export GIT_PS1_SHOWCOLORHINTS=1
- export GIT_PS1_SHOWDIRTYSTATE=1
- export GIT_PS1_SHOWUPSTREAM="auto"
- PROMPT_COMMAND='__git_ps1 "" " \w \\\$ "'
-fi
-
# XDG
export XDG_DATA_HOME="${HOME}"/.config
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
diff --git a/.vimrc b/.vimrc
@@ -18,6 +18,11 @@ let g:netrw_banner = 0
" Plugin Management
+let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
+if empty(glob(data_dir . '/autoload/plug.vim'))
+ silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
+ autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
+endif
call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
@@ -35,9 +40,10 @@ nmap <Leader>f :GFiles<CR>
nmap <Leader>F :Files<CR>
nnoremap <leader>t :tabnew<cr>
-" Theming
+" Theming Begin
+" Git Gutter
highlight GitGutterAdd ctermfg=green
highlight GitGutterChange ctermfg=yellow
highlight GitGutterDelete ctermfg=red
highlight GitGutterChangeDelete ctermfg=yellow
-
+" Theming End