Skip to content

Instantly share code, notes, and snippets.

@jacobvosmaer
jacobvosmaer / gist:3188296
Created July 27, 2012 14:22
Terminal touch typing shortcuts in OS X

Terminal touch typing shortcuts in OS X

Remapping CAPS LOCK to Control also has benefits outside of the terminal in OS X (10.7).

Remapping CAPS LOCK and enable the Meta key

OS X's terminal becomes a much happier place if you remap CAPS LOCK to the Control key, and if you enable the Option key. One downside of this, which applies only in Terminal.app, is that you can no longer enter symbols which can only be

@jacobvosmaer
jacobvosmaer / gist:3187346
Created July 27, 2012 10:35
Open all files with git merge conflicts in Vim

Open all files with git merge conflicts in MacVim

git diff --name-only | uniq | xargs mvim

When git encounters a merge conflict, e.g. during a rebase, it drops you back into the shell with a dirty working directory. I like this one-liner for opening all files with a merge conflict in MacVim.

Once you're in Vim, you can then switch between the files with :n and :prev, or another favourite: :w | n (save current file and open the next command line-supplied file).

UPDATE: see below for a version that works with real terminal commands.