refactor(console): reshuffle profile files & set vim as $EDITOR

This commit is contained in:
Pavel Korytov 2021-03-31 21:48:20 +03:00
parent 286994dd42
commit 80d6256f5e
4 changed files with 37 additions and 42 deletions

View file

@ -2,6 +2,6 @@
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
[[ -f ~/.profile ]] && . ~/.profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
[[ -f ~/.bashrc ]] && . ~/.bashrc

38
.bashrc
View file

@ -8,42 +8,6 @@ use_fish=true
# ===================== PROGRAMS =====================
export MANPAGER="sh -c 'sed -e s/.\\\\x08//g | bat -l man -p'"
# ===================== PATHS =====================
if [ -d "$HOME/bin" ] ; then
export PATH="$HOME/bin:$PATH"
export PATH="$HOME/bin/scripts:$PATH"
fi
export MANPATH="/usr/local/texlive/2020/texmf-dist/doc/man:$MANPATH"
export INFOPATH="/usr/local/texlive/2020/texmf-dist/doc/info:$INFOPATH"
export PATH="/usr/local/texlive/2020/bin/x86_64-linux:$PATH"
if [ -d "$HOME/.cargo" ] ; then
export PATH="$HOME/.cargo/bin:$PATH"
fi
if [ -d "$HOME/.rvm" ] ; then
export PATH="$PATH:$HOME/.rvm/bin"
fi
# if [ -d "$HOME/.gem" ]; then
# export PATH="$HOME/.gem/ruby/2.7.0/bin:$PATH"
# fi
if [ -d "$HOME/go" ] ; then
export PATH="$HOME/go/bin:$PATH"
fi
# export PATH="$HOME/.gem/ruby/2.7.0/bin/:$PATH"
[ -f "/home/pavel/.ghcup/env" ] && source "/home/pavel/.ghcup/env" # ghcup-env
# ===================== PERL =====================
if [ -d "$HOME/perl5" ] ; then
PATH="/home/pavel/perl5/bin${PATH:+:${PATH}}"
PERL5LIB="/home/pavel/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/pavel/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/pavel/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/pavel/perl5"; export PERL_MM_OPT;
fi
# ===================== FISH =====================
if [[ $(ps --no-header --pid=$PPID --format=cmd) != "fish" && ${use_fish} ]]
@ -148,7 +112,7 @@ source /usr/share/fzf/key-bindings.bash
# ===================== ALIASES =====================
alias v="nvim"
alias v="vim"
alias gg="lazygit"
alias ls="exa --icons"
alias ll="exa -lah --icons"

View file

@ -3,7 +3,7 @@ starship init fish | source
fish_vi_key_bindings
alias c="clear"
alias v="nvim"
alias v="vim"
alias gg="lazygit"
alias ls="exa --icons"
alias ll="exa -lah --icons"
@ -16,4 +16,4 @@ eval /home/pavel/Programs/miniconda3/bin/conda "shell.fish" "hook" $argv | sourc
if ! test -n "$TMUX"; and ! test -n "$IS_EMACS";
colorscript random
end
end

View file

@ -1,4 +1,4 @@
export EDITOR=/usr/bin/nvim
export EDITOR=/usr/bin/vim
export BROWSER=/usr/bin/firefox
export QT_QPA_PLATFORMTHEME="qt5ct"
export QT_AUTO_SCREEN_SCALE_FACTOR=0
@ -8,3 +8,34 @@ if [ -d "$HOME/bin" ] ; then
export PATH="$HOME/bin:$PATH"
export PATH="$HOME/bin/scripts:$PATH"
fi
# ===================== PATHS =====================
export MANPATH="/usr/local/texlive/2020/texmf-dist/doc/man:$MANPATH"
export INFOPATH="/usr/local/texlive/2020/texmf-dist/doc/info:$INFOPATH"
export PATH="/usr/local/texlive/2020/bin/x86_64-linux:$PATH"
if [ -d "$HOME/.cargo" ] ; then
export PATH="$HOME/.cargo/bin:$PATH"
fi
if [ -d "$HOME/.rvm" ] ; then
export PATH="$PATH:$HOME/.rvm/bin"
fi
# if [ -d "$HOME/.gem" ]; then
# export PATH="$HOME/.gem/ruby/2.7.0/bin:$PATH"
# fi
if [ -d "$HOME/go" ] ; then
export PATH="$HOME/go/bin:$PATH"
fi
# export PATH="$HOME/.gem/ruby/2.7.0/bin/:$PATH"
[ -f "/home/pavel/.ghcup/env" ] && source "/home/pavel/.ghcup/env" # ghcup-env
# ===================== PERL =====================
if [ -d "$HOME/perl5" ] ; then
PATH="/home/pavel/perl5/bin${PATH:+:${PATH}}"
PERL5LIB="/home/pavel/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/pavel/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/pavel/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/pavel/perl5"; export PERL_MM_OPT;
fi