Productivity tips & tricks

for a developer





Sebastian Witowski
Swapping ESC and Caps Lock
GTD book cover
How to improve your productivity

dotfiles

.bashrc, .vimrc, .gitconfig


alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."

alias ll='ls -al'

alias g="git"
alias ga="git add"
alias gb="git branch"
alias gci="git commit"

alias prod1='ssh cds-wn-01'
alias prod2='ssh cds-wn-02'

alias chown='chown --preserve-root'
                    
source

dotfiles

.bashrc, .vimrc, .gitconfig



syntax enable       " enable syntax processing
set number          " display line numbers
set showcmd         " show command in bottom bar
set showmatch       " higlight matching parenthesis
set history=1000    " store lots of :cmdline history
set incsearch       " search as characters are entered

" Allow saving of files as sudo
command W w !sudo tee % > /dev/null

" Pressing s will toggle and untoggle spell checking
map s :setlocal spell!
source

dotfiles

.bashrc, .vimrc, .gitconfig



[alias]
    ci = commit
    co = checkout
    d = diff
    l = log

    # Squash last N commits together
    squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"

    # Checkout a PR (usage: git copr 1234)
    copr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"

    # Merge GitHub pull request on top of the `master` branch
    ...
                    
source

vim



" Map leader key to space
let mapleader = "\"

IPython


Execute some code each time you start IPython



....
c.InteractiveShellApp.exec_lines = [
    'from invenio.search_engine import perform_request_search',
    'from invenio.bibformat_engine import BibFormatObject'
]
IPython#config-file

Text expanders


Example of text expander settings

What are your tricks?


Productivity improvements

@SebaWitowski

slides: https://switowski.gitlab.io/productivity-for-developers