February 26, 2012
Google Reader for Android is awful
I have another problem. This one is a little more subjective. When I click mark all as read, I want my RSS reader to jump back out to the level above whatever I just marked as read. If I mark a feed as read, I want to jump out to the folder/tag containing that feed. If I mark a whole tag full of posts as read, I want to be back out to the root level. I don't want to have to hit back twice or three times to get there (and then wait for the refresh). If I hit mark as read, I'm done with whatever I'm reading. I'm ready to go on to something else. Why else would I have hit the button? Maybe other people have some strange workflow where they mark as read and then read things, but those people are doing it wrong. If I remember correctly, Reeder on iOS does this the way I like.
Anyways, rant over.
February 25, 2012
Down with CommandT! Long live CtrlP!
I received a tip from my friend John Hawthorn. I tossed out CommandT yesterday, and swapped in ctrlp.vim. CtrlP has a couple of features that make it a better solution than CommandT. First, it is written in pure VimScript. I was working on remote Linux machines at the University of Victoria, and the Vim package they use is compiled with Ruby, among other things, making it impossible to use CommadT. I did compile Vim myself on the machine to get the other missing features, but the box didn’t even have the Ruby headers on it, so it was too much work just for that feature. With CtrlP, I no longer have to worry about that.
CtrlP is also extensible. I’ve already thought of a few ideas for extensions, and maybe I’ll take a couple hours one of these days and implement them. In the meantime, I’ve mapped CtrlP to my fav
"""ctrlp.vim"""
let g:ctrlp_working_path_mode = 0
nmap <leader><leader> :CtrlP<cr>
"RoR CtrlP stuff
nmap <leader>ec :CtrlP app/controllers<cr>
nmap <leader>ea :CtrlP app<cr>
nmap <leader>em :CtrlP app/models<cr>
nmap <leader>ev :CtrlP app/views<cr>
Note: I do this so all my file opening techniques start with the same keystrokes:
nmap <leader>ee :e
February 21, 2012
Textmate's niceties in Vim
Textmate is a pretty well designed editor, but it lacks some features that I consider necessary in a programming text-editor. That said, it comes stock with some things that my favourite text-editor, Vim, lacks.
Command-T (familiar for serious Textmate users, I’m sure) is a huge time saver. It allows me to get to the files I’m looking for so much faster than being forced to do
:e typity<tab>type<tab><tab><tab>type<tab><cr>
or the equivalent :b command. Suddently I’m just typing a few characters from each path element and hitting enter as soon as I see what I want. It removes scanning for the file I’m looking for (with my eyes) which is actually pretty slow. As soon as there is only one thing in the list I know I can stop typing. I’ve even done this:
:nmap <leader><leader> :CommandTFlush<cr>:CommandT<cr>
With that in my .vimrc I can double tap my leader and type some gibberish and get the file I’m looking for.
The other plugin I just started using today is snipMate. SnipMate provides the snippet functionality that TextMate has to Vim. It is pretty handy, not having to type all that boilerplate code.
Here’s a low quality, no sound, screencast showing what it does:
The moral of the story?
Real nerds do it in Vim.
Now that isn’t quite as sexy sounding as I’d hoped it would be, but Vim is worth learning. I swear it’s true. Give it time. The other day, I refactored some RSpec tests someone had (poorly) written with a couple of macros in less than 30 seconds, where without the macros it would have taken me 25 seconds times the number of tests (which was a lot).
I save so much time with Vim (and spend that time writing blog posts like this).
February 16, 2012
I picked up jarednorman.ca
February 15, 2012
Quick pasting from graphical environment into Vim
:nmap <leader>c "*p
Tada! Now I can paste into Vim easily without having to hit that awful to type key combination, with comma c (\ c by default).
My time as a Vim user
Excluding my brief attempt at learning MSVC++ when I was in elementary school (I sure wish I’d stuck with that) the bulk of my learning to program time was in the summer before grade 11. At the end of the previous school year, I had realized that I wanted to learn how to program, and specifically make games. That summer I learned C. The first real program I wrote was a pong-clone that matched my KDE theme (an awful purple theme that I can’t believe I ever used).
At the beginning I used gedit, kate, and a variety of other editors common on Linux. At some point very early on I tried Vim, went through the tutorial, decided that it was neat, but too hard to use. I didn’t come back to Vim until some time in grade 12.
February 11, 2012
Keeping the APM up
February 9, 2012
Review: The Ruby Programming Language
PeepCode
February 4, 2012
On being someone else
Up until about a year ago, I had an awful attitude. My attitude isn’t perfect now, but I’m working on it. When I graduated from high school, I had already completed a couple of University courses at the 1st and 2nd year level and had done well. I was basically given an auto-100% in Information Technology 11 and 12 at my high school. I thought I was better than everyone else.