Google Chrome has trained my brain that Ctrl+T, and ⌘+⌥+[arrows] will move me to the next and previous tabs. I wanted vim to work the same way. In .vimrc:
""""" TAB BEHAVIOR
" Ctrl+t to open new tab
" Note: this overwrites a shortcut for the tag stack, if you use tags
nnoremap <C-t> :tabnew
" Chrome-like shortcuts for prevtab and nexttab
" (Meaning ⌘+⌥+[arrows])
nnoremap <ESC>[1;9D gT
nnoremap <ESC>[1;9C gt
YMMV on the exact mappings to use, see below on how to figure it out for yourself. I found a lot of solutions that didn’t work for me, including pressing the key combo in vim under Visual Line mode, so it would show me vim’s notation for what keys it’s getting. But the problem was three things failing in some combination:
— The terminal was mangling the input before it got to vim
— Vim wasn’t showing me the starting “^[” (escape key)
— Vim wasn’t displaying the [1; section of the input either. Just “:9C” or “:9D”
After a lot of searching, I finally found this simple solution to figure out what the terminal is actually sending, and translate to vim speak, all in one. Using the terminal on my Macbook Pro, it’s surprisingly simple:
> sed -n l
[Press whatever key combination you want]
The output it showed me was “^[[1;9D”, so my key signature to map was “<ESC>[1;9D”
You can see my entire .vimrc file on Github. Hat tip to Adam Morse for the warning on Ctrl+T and the tag stack.
Tiiny is a fun new mini-app by Kevin Rose’s new company, which creates a wall of fun looping micro-videos from your friends and follow-ees that somehow feels very familiar…
It’s new, so there’s a TON of notifications on the app, which gave me some serious notification fatigue. But perhaps more interestingly, I don’t even remember allowing push notifications. At first I thought I was crazy, but it came up again on the ProductHunt thread. In a (very informal) poll I just did around the office, only 1 in 6 people remembered allowing push notifications in the on-boarding flow.
But it turns out we all definitely did. The notifications popup shows at the exact moment that we’re shown the wall of our friends loading.
The notifications popup shows at the exact moment that we're shown the wall of our friends loading
My working theory: it’s a novel instance of classic misdirection. We’ve been trained by years of popups to quickly dismiss them (Sure you want to close this tab? Review our app! Really delete this file? Join my mailing list!…). Combine that with the powerful draw of gifs popping up in the background, most of which are faces looking directly at you, and you’ve got a powerful misdirection effect. If this is actually a repeatable phenomenon, then with great power comes great responsibility. What do you think: real phenomenon or coincidence? Evil genius, or happy accident?
jon@localhost trunk> uptime
14:08 up 53 days, 22:35, 12 users, load averages: 2.69 1.68 1.50
Dear diary: Almost 54 days without restarting my Macbook Pro.
Skype’s chat UI changes when I unplug the power; Chrome has begun aribtrarily turning webpages to flat white. There are equally bizarre workarounds for each, but I am finally giving in and restarting.
Goodnight, sweet prince. You’ve had a good run.