I’ve been hooked on Vim ever since typing $ vimtutor in my bash shell and witnessing the power of a real text editor. Learning Vim decreased my productivity for at least a week (especially the first few days), but has slightly improved my efficiency after I got over the initial learning hump. Vim feels like a real text editor compared to Sublime Text and Textmate, which feel like fancy versions of Microsoft Word.
I’ve only learned the basics of Vim and still need to read a book and learn how to write Vimscript and fully leverage all of Vim’s features. Before fully committing to Vim, I want to learn the basics of Emacs and see if I like it even more than Vim.
MacVim with the Janus collection of plugins makes the transition from Sublime Text or Textmate to Vim easier. The Janus plugin provide a file directory structure with NerdTree, allow for Command + T filename searching, provide a collection of snippets for virtually all programming languages, and much more.
Basic shortcuts for frequently used software are also an easy way to increase productivity. Shortcuts that can be used on a daily basis, like Control + w to delete the last word in a bash shell, Command + t to open up a new tab in Chrome and Option + backspace to delete the last word in any other program are the lowest hanging fruit. Any shortcut that can be used multiple times per day should be memorized and used. Study up on basic browser, email, text editor, and Terminal shortcuts and have the discipline to redo tasks if you catch yourself using a mouse and ignoring the shortcut.
I primarily use Google Chrome with the Vimium plugin that provides Vim styles shortcuts in the browser. It is wonderful to have consistent keybindings in different contexts (i.e. gg goes to the top of a file in my text editor and gg goes to the top of a webpage in Chrome). With Vimium enabled, the f key makes links accessible with typing on the keyboard, so a mouse is rarely required. I also use the standard Chrome shortcuts extensively (i.e. Command + t to open a tab and Command + w to close a tab).
I dislike the standard Mac keyboards for regular typing and truly hate them for programming. The keys are too little and hard to press and the layout is not ergonomic. The Microsoft Natural Keyboard Elite is OK, but the key layout is “standard” so there is way too much responsibility for the right pinky. As the following image illustrates, some fingers are only responsible for a few keys (i.e. middle and ring finger are only responsible for 4 keys), but the right pinky is responsible for 13 keys (17 keys including the arrow keys)!
For “regular” keyboard users, the “right pinky keys” are not used too frequently, but these keys are used all the time by programmers. The pinky is the weakest finger and proper typing form on a standard keyboard was starting to cause me right pinky pain.
I found keyboard nirvana with the Kinesis Advantage keyboard.
The right pinky responsibilities are vastly reduced with the sensible key layout and I only had to remap a few keys:
Delete -> Command
Page Down -> Option
Down -> Up (more natural for Vimmers to go down with index finger)
Up -> Down
Right Thumb Command -> Control
Similar to Vim, the Kinesis keyboard took about a week to learn and working slowly was annoying. After getting used to the keyboard, my typing speed increased slightly (about 65 words per minute) but my typing accuracy has improved tremendously, especially for “special” characters like |, @, :, “, etc. The Kinesis hasn’t made me much faster, but it is pleasant to work with and my right pinky feels much better. My next job is to learn the Dvorak keyboard layout.
I use a Furinno laptop stand to keep the top of my laptop at eye-level. At work, I have an awesome external monitor and one day I will purchase an external monitor for my home office. I keep my keyboard on my lap when typing so my shoulders are in a relaxed position. The Kinesis keyboard allows me to keep my shoulders wide and the Vimium Chrome plugin lets me do almost everything with my keyboard, so I am rarely reaching for my mouse. I have some scoliosis in my back and neck, but my ergonomic workspace keeps the symptoms mostly at bay. This picture sums up how I try to sit:
A wandering mind and external distractions are the bane of my productivity. Getting a gChat or text message will immediately break my train of thought and cause me to focus on something else. If the $ rails console command is slow, I may be tempted to check HackerNews “quickly” and voluntarily destroy my train of thought. Sometimes my wandering mind will encourage me to Google random things like “how many career goals did Joe Sakic have” or “was wolf of wall street based on a true story” in the middle of programming. Other times, I will be in the middle of a task, check Trello to find the next acceptance criteria for a story, notice that I have 6 notifications on other stories, and get distracted by checking the notifications.
I’ve taken steps to minimize distractions, but have been largely unsuccessful. I put my phone on silent and keep it out of sight, always have my gChat say I am busy to discourage people from IMing me, occasionally turn the internet off to discourage Googling random things when I should be focusing, and sometimes create PDFs of Trello cards so I am not distracted by notifications when I have to check Trello.
My efforts to minimize distractions have basically been a failure. On my way to the bathroom, I have a habit of checking gMail, sometimes I forget to turn my phone noise off, I constantly Google random stuff, and Trello or the work chatroom can easily divert. Effectively using shortcuts and a text editor is great, but the benefits can easily be counteracted by a distracting work environment and I am one of the many programmers that is trying to find the right balance in this world of stimuli.