Other OSX Config - sym3tri/dotfiles GitHub Wiki

Fix the Home and End keys for an External Keyboard on MacOS

From: https://medium.com/@elhayefrat/how-to-fix-the-home-and-end-buttons-for-an-external-keyboard-in-mac-4da773a0d3a2

Add file: ~/Library/KeyBindings/DefaultKeyBinding.dict

With contents:

{
/* Remap Home / End keys */
/* Home Button*/
"\UF729" = "moveToBeginningOfLine:"; 
/* End Button */
"\UF72B" = "moveToEndOfLine:"; 
/* Shift + Home Button */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; 
/* Shift + End Button */
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; 
/* Ctrl + Home Button */
"^\UF729" = "moveToBeginningOfDocument:"; 
/* Ctrl + End Button */
"^\UF72B" = "moveToEndOfDocument:"; 
 /* Shift + Ctrl + Home Button */
"$^\UF729" = "moveToBeginningOfDocumentAndModifySelection:";
/* Shift + Ctrl + End Button*/
"$^\UF72B" = "moveToEndOfDocumentAndModifySelection:"; 
}

Some sensible osx defaults

https://github.com/mathiasbynens/dotfiles/blob/master/.osx/

Set MacVim as the default editor for all files with a MIME type of text ([ref]

(http://superuser.com/questions/231854/default-editor-for-files-without-file-name-extension-in-mac-os-x))
open ~/Library/Preferences/com.apple.LaunchServices.plist
Add an entry (dictionary) under LSHandlers containing the following keys/values:
LSHandlerContentType = public.plain-text
LSHandlerRoleAll = org.vim.macvim

Run JSLint locally

https://gist.github.com/1668719