Edit: my updated dot files can be found on github.

As a developer it is really important to feel comfortable with his computer setup as we use I use it all day long.

I am working on a Mac and for compliance questions I can’t change the OS.This is not really a problem as I am using very few programs (browser, email, terminal), and all of them are in full screen, so I don’t see much the underlying system.

My philosophy is to use as much as possible open-source softwares. I prefer spend more time configuring, learning and patching an open-source application than mastering with more easy a non-free one. In reality many free software a way better than commercial one!

my terminal

Web browser

I am using Firefox but with some add-ons:

  • uBlock Origin for content filtering (removes adds but also trackers)
  • Self Destructing Cookie to remove my old cookies when closing a tab
  • RefControl to controls sent HTTP referer (avoid leaking some personal informations when following links)
  • HTTPS Everywhere to automatically switch to HTTPS version if available

My default search engine is DuckDuckGo which perform great most of the time and for more specific search queries I use StartPage (via !startpage bang).

Of course I don’t have the flash plugin installed on my computer and I don’t see much limitation about that.

Email reader

Maybe one day I will spend some time configuring mutt, but for now Thunderbird does the job very nicely. By moment it takes a huge amount of memory (> 400MB) but nowadays with our machines with 4 or 8GB of RAM you will not notice it.

To improve a bit email reading I use Conversations plugin that render thread as in GMail (at least as it was in the beta, I have not used it recently).

Last but not least I use Enigmail to at least sign my emails and encrypt it when possible.

Terminal emulator

I use iTerm2, I could have used Apple Terminal but color support is very poor. iTerm2 is not much better but it allow me to don’t spend too much time on this very basic feature. Even if iTerm have a good tab and pane capabilities, I use tmux for this which is very flexible, feature-full, lightweight and works on different OS if needed.

My tmux config is minimalist, I have just defined some shortcuts to navigate between windows/pane and resize it.

# utf8 is on
set -g utf8 on
set -g status-utf8 on

# upgrade $TERM
set -g default-terminal "screen-256color"
set -sg escape-time    1
set -g base-index      1
set -g pane-base-index 1
set -g mode-keys emacs
set -g history-limit 10000

# Make copy/paste works on OSX
set-option -g default-command "reattach-to-user-namespace -l zsh"
bind C-c copy-mode

# Mouse works as expected
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"

# Easy-to-remember split pane commands
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
unbind '"'
unbind %

# URXVT tab like window switching (-n: no prior escape seq)
bind -n S-down new-window -c '#{pane_current_path}'
bind -n S-left prev
bind -n S-right next
bind -n C-left swap-window -t -1
bind -n C-right swap-window -t +1

# Resize panes
bind -n M-left resize-pane -L 5
bind -n M-down resize-pane -D 5
bind -n M-up resize-pane -U 5
bind -n M-right resize-pane -R 5

# Reload tmux config
bind r source-file ~/.tmux.conf

# Status bar
set -g status-bg black
set -g status-fg white
set -g window-status-current-bg white
set -g window-status-current-fg black
set -g window-status-current-attr bold
set -g status-interval 60
set -g status-left ''
set -g status-right '%H:%M'

On Mac OS X getting clipboard working require to use a small program to fix some Apple issue (hence the specific option in the configuration).

Something that surprise a lot my colleagues is that when I want to copy something I just select it in my terminal, no need to Ctrl+C as I don’t use the mouse for another thing!

Maybe one day I will spent some time looking at tmux-plugins to extend some functionalities.

Text editor

As I have a nicely configured terminal I can take advantage of it, that’s why I use Vim. In fact Vim is an awesome editor since you have configured it to fit your need. I have tried other editors like SublimeText (not open-source!) or IDEs like eclipse but since you master Vim you can be far more productive and you are not lost when working on a remote server.

As a base Vim config I use spf13 that set reasonable settings and comes with all needed plugins. I have however changed few settings in my ~/.vimrc.local:

" -- Spell check
set spellsuggest=best,10
nnoremap <F6>   :set spell!<CR>
inoremap <F6>   <Esc>:set spell!<CR>i

" --- Folding
"UnBundle 'AutoClose'
"set nofoldenable
set foldlevel=9

" --- Colors
let g:solarized_termcolors=16
color solarized

" --- Line numbers
function! ToggleNumbering()
  if &relativenumber
    set number
    set norelativenumber
  else
    set relativenumber
    set nonumber
  endif
endfunc

noremap <leader>n :call ToggleNumbering()<cr>

" -- Tabs navigation
nnoremap <tab>   :tabnext<CR>
nnoremap <S-tab> :tabprevious<CR>

" -- Search current selection
vnoremap // y/<C-R>"<CR>

" -- Python-mode related
let g:pymode_lint_checkers = ['pyflakes', 'pep8']
let g:pymode_trim_whitespaces = 3
let g:pymode_options_max_line_length = 150
let g:pymode_lint_on_fly = 1
let g:pymode_rope = 1
let g:pymode_folding = 0
let g:pymode_lint_ignore = "E502"

" -- Tagbar related
nnoremap <silent> <leader>t :Tagba

" -- Copy/Paste related
"set pastetoggle=<F12>
nnoremap <Leader>yp :let @*=expand("%:p")<cr>:echo expand("%:p")<cr>
nnoremap <Leader>yf :let @*=expand("%")<cr>:echo expand("%")<cr>

and in ~/.vimrc.before.local:

let g:spf13_bundle_groups=['general', 'writing', 'neocomplcache', 'programming', 'python', 'javascript', 'html', 'misc',]
" let g:autoclose_on = 0"

You may need to install ctags and flake8 to get all features.

Other tools

As I am developing APIs, I often need to make requests, to do so I use httpie, a curl/wget replacement with human friendly command-line options. Beware, httpie is based on python-requests which means that HTTP requests are done using your Python distribution. Until Python 2.7.9, only TLSv1 was supported, if the cipher suite of your server is a bit strict you may have some trouble.

If you need a Python interpreter from time to time to test some code snippets, iPython can help you with nice completion, help and debug capabilities.

I also use ZSH with Oh My ZSH as my default shell interpreter with the default configuration but with the philips theme.

To listen music from my terminal I use cmus which does the job great but may freeze from time to time.