From 687999be1a3b346f2f43e2d17cc0665b55ba26a0 Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Fri, 25 Jun 2021 03:12:38 -0700 Subject: [PATCH] some more fixes that would work in fb devservers. --- config/.bash_profile | 38 +++++++++++++++++++------------------- config/.bashrc | 11 ++++++++++- config/.profile.prompt | 6 ++++++ vim/vimrc | 14 +++++++------- 4 files changed, 42 insertions(+), 27 deletions(-) diff --git a/config/.bash_profile b/config/.bash_profile index 4b531b8..5fefba7 100755 --- a/config/.bash_profile +++ b/config/.bash_profile @@ -34,27 +34,27 @@ set -o vi export EDITOR=vim export LESS=-R -# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -# -# User specific environment and startup programs -# +## =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +## +## User specific environment and startup programs +## -if [ -e $HOME/bin ]; then - export PATH=$HOME/bin:$PATH -fi -MYSCRIPTS=$HOME/devel/scripts -if [ -e $MYSCRIPTS/bin ]; then - export PATH=$MYSCRIPTS/bin:$PATH -fi -MYCFG=${MYSCRIPTS}/config +#if [ -e $HOME/bin ]; then +# export PATH=$HOME/bin:$PATH +#fi +#export MYSCRIPTS=$HOME/devel/scripts +#if [ -e $MYSCRIPTS/bin ]; then +# export PATH=$MYSCRIPTS/bin:$PATH +#fi +#export MYCFG=${MYSCRIPTS}/config -# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -# Set command prompt -[ -x ${MYCFG}/.profile.prompt ] && source ${MYCFG}/.profile.prompt -[ -x ${MYCFG}/.profile.dircolor ] && source ${MYCFG}/.profile.dircolor -[ -x ${MYCFG}/.profile.completion ] && source ${MYCFG}/.profile.completion -[ -x ${MYCFG}/.profile.dev ] && source ${MYCFG}/.profile.dev -[ -x ${MYCFG}/.profile.aliases ] && source ${MYCFG}/.profile.aliases +## =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +## Set command prompt +#[ -x ${MYCFG}/.profile.prompt ] && source ${MYCFG}/.profile.prompt +#[ -x ${MYCFG}/.profile.dircolor ] && source ${MYCFG}/.profile.dircolor +#[ -x ${MYCFG}/.profile.completion ] && source ${MYCFG}/.profile.completion +#[ -x ${MYCFG}/.profile.dev ] && source ${MYCFG}/.profile.dev +#[ -x ${MYCFG}/.profile.aliases ] && source ${MYCFG}/.profile.aliases # # Clean error level. diff --git a/config/.bashrc b/config/.bashrc index 7d59e55..4f26dde 100755 --- a/config/.bashrc +++ b/config/.bashrc @@ -66,10 +66,11 @@ shopt -s checkwinsize if [ -e $HOME/bin ]; then export PATH=$HOME/bin:$PATH fi -MYSCRIPTS=$HOME/devel/scripts +export MYSCRIPTS=$HOME/devel/scripts if [ -e $MYSCRIPTS/bin ]; then export PATH=$MYSCRIPTS/bin:$PATH fi +export MYCFG=${MYSCRIPTS}/config # # VIM @@ -77,6 +78,14 @@ fi export EDITOR=vim export LESS=-R +# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +# Set command prompt +[ -x ${MYCFG}/.profile.prompt ] && source ${MYCFG}/.profile.prompt +[ -x ${MYCFG}/.profile.dircolor ] && source ${MYCFG}/.profile.dircolor +[ -x ${MYCFG}/.profile.completion ] && source ${MYCFG}/.profile.completion +[ -x ${MYCFG}/.profile.dev ] && source ${MYCFG}/.profile.dev +[ -x ${MYCFG}/.profile.aliases ] && source ${MYCFG}/.profile.aliases + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # # Run local settings. diff --git a/config/.profile.prompt b/config/.profile.prompt index 1fd90e4..455d264 100755 --- a/config/.profile.prompt +++ b/config/.profile.prompt @@ -152,5 +152,11 @@ if [ -n "$PS1" ]; then # calculate prompt length. The text is set through PROMPT_COMMAND PS1+="\[${c_reset}\]\$ " # reset colors and print $ } + + if [ -n "$BASH_VERSION" ]; then + # shopt -s checkwinsize + export -f __prompt_command + export -f term_colors + fi fi diff --git a/vim/vimrc b/vim/vimrc index de0538f..59917a7 100755 --- a/vim/vimrc +++ b/vim/vimrc @@ -359,7 +359,7 @@ map :tab split:exec("tag ".expand("")) " Grep options affect GNU grep. The intend is that greps not supporting the " options will continue working without options. " -let $GREP_OPTIONS.=' --exclude-dir=.git --exclude-dir=.svn' +let $GREP_OPTIONS.=' --exclude-dir=.git --exclude-dir=.svn --exclude-dir=.hg' let $GREP_OPTIONS.=' --exclude=tags --exclude=*.o --exclude=*.log' let $GREP_OPTIONS.=' --exclude=*.swp' let $GREP_OPTIONS.=' --exclude-dir=llcalc* --exclude-dir=00*' @@ -388,12 +388,12 @@ noremap gj " " Working with tabs especially if using console version. " -nnoremap th :tabfirst -nnoremap tj :tabnext -nnoremap tk :tabprev -nnoremap tl :tablast -nnoremap tm :tabm -nnoremap td :tabclose +" nnoremap th :tabfirst +" nnoremap tj :tabnext +" nnoremap tk :tabprev +" nnoremap tl :tablast +" nnoremap tm :tabm +" nnoremap td :tabclose """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Plugins