For a long time, YouTube and Google Groups always make me groan. I often ended up with searching something like o gm, I was opening Gmail actually.

Their search boxes steal my precious control. If you are using that slow mouse—point, point, and click, you probably have never noticed that YouTube and Google Groups kindly help you enter the search box, they thought it’s convenient for users. Wrong! When most of sites don’t help users with that—and “why they don’t? Think, YouTube and Google Groups!” you are only creating burden for users.

Luckily, it’s easy to fix with Vimperator:

" Get my damn focus back
autocmd PageLoad (www\\.youtube|groups.google)\\.com :normal <Esc>

I use autocmd to emulate a keypress of Escape to exiting Input mode.

A side note if you are also using Gmail’s and Reader’s shortcut keys a lot, the following command let you enter Pass through mode automatically:

" Enter passthrough mode automatically in Gmail, Reader
autocmd LocationChange .* js modes.passAllKeys = /(mail\.google\.com|www\.google\.com\/reader\/)/.test(buffer.URL)

I was hoping I could find a way to re-map a and A because I usually have to re-add bookmark after I wanted to Mark all as read using A, it’s a removal of bookmark. I couldn’t find any, but the method above is acceptable.