diff options
| -rw-r--r-- | .bashrc | 32 | ||||
| -rw-r--r-- | .zshrc | 12 | ||||
| -rw-r--r-- | Makefile | 13 |
3 files changed, 23 insertions, 34 deletions
@@ -1,13 +1,3 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. -# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) -# for examples - -# If not running interactively, don't do anything -case $- in - *i*) ;; - *) return;; -esac - # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth @@ -23,13 +13,6 @@ HISTFILESIZE=2000 # update the values of LINES and COLUMNS. shopt -s checkwinsize -# If set, the pattern "**" used in a pathname expansion context will -# match all files and zero or more directories and subdirectories. -#shopt -s globstar - -# make less more friendly for non-text input files, see lesspipe(1) -#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" - # set variable identifying the chroot you work in (used in the prompt below) if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) @@ -40,11 +23,6 @@ case "$TERM" in xterm-color|*-256color) color_prompt=yes;; esac -# uncomment for a colored prompt, if the terminal has the capability; turned -# off by default to not distract the user: the focus in a terminal window -# should be on the output of commands, not on the prompt -#force_color_prompt=yes - if [ -n "$force_color_prompt" ]; then if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then # We have color support; assume it's compliant with Ecma-48 @@ -84,18 +62,8 @@ if [ -x /usr/bin/dircolors ]; then alias egrep='egrep --color=auto' 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' - -# some more ls aliases alias ll='ls -l' alias la='ls -A' -#alias l='ls -CF' - -# Alias definitions. -# You may want to put all your additions into a separate file like -# ~/.bash_aliases, instead of adding them here directly. -# See /usr/share/doc/bash-doc/examples in the bash-doc package. if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases @@ -5,11 +5,11 @@ HYPHEN_INSENSITIVE="true" DISABLE_MAGIC_FUNCTIONS=true HIST_STAMPS="dd/mm/yyyy" -plugins=(colorize command-not-found git) +plugins=(colorize command-not-found git zsh-syntax-highlighting) source $ZSH/oh-my-zsh.sh -export KEYTIMEOUT=1 bindkey -v +export KEYTIMEOUT=1 setopt auto_cd setopt pushd_ignore_dups @@ -49,6 +49,7 @@ alias info="info --vi-keys" alias moula="gcc -Wall -Wextra -Werror" alias list-c-includes-paths="echo | gcc -E -Wp,-v -" alias yoump3='youtube-dl --extract-audio --audio-format mp3' +alias adg="sudo apt update && sudo apt upgrade" function chpwd() { file_count=$(ls | wc -w) @@ -65,6 +66,13 @@ alias vimrc="vim $DOTFILES/.vimrc" alias vimplugrc="vim $DOTFILES/.vimrc -c 'vsp $DOTFILES/.pluggins.vim'" alias tmuxrc="vim $DOTFILES/.tmux.conf && tmux source-file $DOTFILES/.tmux.conf" +# vim keys in tab completion menu (https://www.youtube.com/watch?v=eLEo4OQ-cuQ) +bindkey -M menuselect 'h' vi-backward-char +bindkey -M menuselect 'k' vi-up-line-or-history +bindkey -M menuselect 'l' vi-forward-char +bindkey -M menuselect 'j' vi-down-line-or-history +bindkey -v '^?' backward-delete-char + # add command-not-found package suggestion source /etc/zsh_command_not_found @@ -51,3 +51,16 @@ clean: .PHONY: re re: clean all + +.PHONY: dependencies +dependencies: + @echo "Installing vim-plug (plugin manager)" + curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + @echo "Installing vim plugins" + vim -c "PlugInstall" -c "qa" + @echo "Installing oh-my-zsh" + sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" + @echo "Installing zsh-syntax-highlighting" + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \ + ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting |
