dotfiles

Cross platform dotfiles for linux, mac and windows
git clone git@getsh.org:dotfiles.git
Log | Files | Refs

commit 3faeb14bfe43ccf0f4867792722fa4c6eb39c6cb
parent caf10f8c7fb77709399c6f8793948f51b803a21a
Author: Bharatvaj <bharatvaj@yahoo.com>
Date:   Sun,  1 Aug 2021 01:16:50 +0530

Merge pull request #2 from bharatvaj/laz3r

Fixes __git_ps1 not found issue
Diffstat:
M.bashrc | 12++++++++++++
R.git-prompt.sh -> .config/.git-prompt.sh | 0
M.profile | 9---------
M.vimrc | 10++++++++--
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