No description
Find a file
2020-08-23 16:27:53 +01:00
images Update readme 2020-08-23 16:27:53 +01:00
vim-plugins hard link all the dot files and add some new stuff... 2019-01-14 13:52:03 +00:00
.bash_aliases update some ancient aliases 2020-08-23 16:27:32 +01:00
.gitconfig add global gitconfig 2019-11-09 10:21:42 +00:00
.gitignore removing ropeproject 2017-10-16 00:13:23 +01:00
.tmux.conf.local remove some unused plugins 2020-08-22 13:14:56 +01:00
.vimrc Do not autorestore sessions because it's annoying 2020-03-12 14:53:42 +00:00
.virtualenvwrapper.sh hard link all the dot files and add some new stuff... 2019-01-14 13:52:03 +00:00
.zshenv source virtualenv wrapper only if it exists 2020-08-22 13:09:27 +01:00
.zshrc check if kubectl exists b4 sourcing 2020-08-22 13:19:11 +01:00
fusuma.yml add fusuma config 2020-08-23 14:42:46 +01:00
README.md Update readme 2020-08-23 16:27:53 +01:00
setup-vim.sh add vim install script updates 2018-01-15 21:53:39 +00:00
setup.sh rename setup script 2020-08-23 15:01:23 +01:00
virtualenvwrapper.sh Oct 2019 updates 2019-10-13 23:47:59 +01:00
wombat256mod.vim add vim colorscheme 2018-08-26 18:38:03 +01:00

Tmux settings

My tmux settings are based on gpakosz's Oh-My-Tmux and I've added/changed some of the settings to better suite my taste

Installation

Download and run setup.sh

curl -sL https://raw.githubusercontent.com/ViktorBarzin/dot_files/master/setup.sh | bash

It will install tmux and zsh if missing and wget all the config files.

Everyday hacks

Shortcuts I use every day. I find all of these shortcuts improve my typing speed and hence my productivity.

They are focused around either 1) less distance my fingers have to move or 2) shorten commonly written commands

tmux

Feature Shortcut
tmux Prefix Alt-x
text selection Prefix Enter to enter visual mode, then vim bindings to move, V to enter select mode and once happy with selection Enter to copy to OS clipboard
Vertical split pane Prefix \
Horizontal pane split Prefix -
Pane movement Hold Alt and vim movement bindings (or arrows for normies) to move in all directions
Pane resize Prefix and vim movement
Maximize current pane Prefix z (z for zoom)
Toggle synchronize panes Prefix s (s for synchronize)
New window Prefix c (c for create)
Go to previous window Prefix Tab (similar to Alt-Tab)
Go to window number n Prefix n where n is window number (window numbers are in status line)
Rename window Prefix ,
Edit a long command line Ctrl-x Ctrl-e , this is more bash-y rather than tmux

To edit the status line, edit tmux_conf_theme_status_left and tmux_conf_theme_status_right in tmux.conf.local.

zsh shortcuts

A full list of all aliases can be seen in the .bash_aliases file.

Here are some of the highlights I tend to use more often:

Alias Command Comment
a sudo atop sudo is used to get full overview
h sudo htop ^
pmr python manage.py runserver Django developers know
nopmr `ps auxw grep runserver
python manage.py migrate pmm
python manage.py make migrations pmmm
g git 66.7% improvement ;)
gs git status
ga git add
gc git commit
gp git push origin master
gpull git pull --rebase origin master Please always rebase, don't do merge commits...
gd git diff
gds git diff --staged Changes that are add-ed and will be part of the commit
gl git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all A very pretty version of git log
git-standup long function, not included for brevity A useful git function to show commits from yesterday that's useful during standups
omg sudo systemctl restart NetworkManager When NetworkManager drives you crazy by crashing often
omg1.1 sudo rmmod iwlmvm && sudo rmmod iwlwifi; sudo modprobe iwlwifi Reload wifi module
myip curl icanhzip.com Get your public/global IPv4/IPv6 address
root sudo su - sudo su (without the -) keeps environment which, in a shared environ, can be dangerous
aliases vim ~/.bash_aliases && source ~/.bash_aliases Convenient way to add new aliases and source them upon exit
zshrc vim ~/.zshrc ^
f free -h Check memory usage
xo xdg-open Handy way to open any file type
dk docker 76.7% performance increase ;)
dkon sudo systemctl start docker
dkoff sudo systemctl stop docker
s ssh
speedtest `curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py python -`
kb kubectl Massive perf increase if you are a k8s user
kubectl get pods kbp
kn kubens Switch k8s namespaces to avoid writing -n some_namespace all the time
toclip xclip -selection clipboard Usually I do `some command