Last active
December 11, 2020 07:15
-
-
Save petrikoz/2e848a184ac8185cecd5 to your computer and use it in GitHub Desktop.
Simple config for hostings: .bashrc, .vimrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################ | |
# Utilities | |
################################################################ | |
function hsi() { | |
history | grep -i $1 | |
} | |
################################################################ | |
# Aliases | |
################################################################ | |
alias md='mkdir -p' | |
alias ll='ls -hl' | |
################################################################ | |
# Completion | |
################################################################ | |
#== Package installer for Python | |
_pip_completion() | |
{ | |
COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \ | |
COMP_CWORD=$COMP_CWORD \ | |
PIP_AUTO_COMPLETE=1 $1 ) ) | |
} | |
complete -o default -F _pip_completion pip | |
#== Pyhton virtualenv wrapper | |
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 | |
source $HOME/.local/bin/virtualenvwrapper.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
b = branch | |
co = checkout | |
fo = fetch -v origin | |
foc = !git fetch -v origin "$(git rev-parse --abbrev-ref HEAD)" | |
l = log | |
ll = log --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' | |
pl = pull | |
plc = !git pull origin "$(git rev-parse --abbrev-ref HEAD)" | |
res = reset | |
resh = reset --hard | |
s = status | |
ss = status -s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#== Base ======================================================= | |
set -g default-terminal "$TERM" | |
set -g main-pane-width 160 | |
#== Keys ======================================================= | |
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# Vim-style navigation in copy-mode | |
set-window-option -g mode-keys vi | |
# reloaded local config | |
bind R source-file "$HOME/.tmux.conf" \; display-message "Reload config from \"$HOME/.tmux.conf\"..." | |
# Un/Zoom current pane | |
bind F3 resize-pane -Z |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
filetype indent plugin on | |
set modeline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Put this file in $HOME/.vim/ftplugin/ | |
set tabstop=8 | |
set expandtab | |
set shiftwidth=4 | |
set softtabstop=4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment