diff --git a/bash/bashrc b/bash/bashrc index a0c3d1e..5296f1e 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -85,7 +85,7 @@ if [ -x /usr/bin/dircolors ]; then fi # colored GCC warnings and errors -#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' +export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' # some more ls aliases alias ll='ls -alF' @@ -116,25 +116,37 @@ if ! shopt -oq posix; then fi fi -for f in ~/.dotfiles/bash/functions/*/*; +# Colors +red='\033[0;31m' +green='\033[0;32m' +nc='\033[0m' + +for f in ~/.dotfiles/bash/functions/*/*; do - echo "Sourcing $f ..." + echo -e "${green} * ${nc} Sourcing $f ..." . $f done if [ -f /usr/share/bash-completion/completions/git ] then - echo "Adding git completion ..." + echo -e "${green} * ${nc} Adding git completion ..." source /usr/share/bash-completion/completions/git fi -echo "Adding local path folders ... ~/.local/bin" +echo -e "${green} * ${nc} Adding local path folders ... ~/.local/bin" export PATH="$PATH:~/.local/bin" -echo "Setting vim as editor ..." +echo -e "${green} * ${nc} Setting vim as editor ..." export EDITOR=vim -echo "Initializing starship ..." +echo -e "${green} * ${nc} Initializing starship ..." eval "$(starship init bash)" +if grep -qEi "(Microsoft|WSL)" /proc/version &> /dev/null +then + echo -e "${green} * ${nc} WSL env detected ..." + export DISPLAY=:0.0 +fi + +echo -e "Ready${green}!${nc}" diff --git a/inputrc b/inputrc index 7220166..cc1fca5 100644 --- a/inputrc +++ b/inputrc @@ -1,2 +1,5 @@ set bell-style none +# map "page up" and "page down" to search history based on current cmdline +"\e[5~": history-search-backward +"\e[6~": history-search-forward diff --git a/vim/vimrc b/vim/vimrc index 726c50c..8b00d6e 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -121,3 +121,5 @@ set cuc " write with superpowers cmap w!! %!sudo tee > /dev/null % +" highlight search matchs +set hlsearch