Skip to content

Instantly share code, notes, and snippets.

View JesseBilsten's full-sized avatar

Jesse Bilsten JesseBilsten

View GitHub Profile
@JesseBilsten
JesseBilsten / Default.sketchpalette
Created November 17, 2015 22:44
A Default color palette for Sketch Color Palette Plugin
{"compatibleVersion":"1.0","pluginVersion":"1.1","colors":["#D40619","#F7A716","#F8E900","#8C5828","#77D406","#3D7600","#C100E2","#9400FE","#488EE3","#40E3C1","#B5EA83","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]}
" Remove trailing whitespace on save
" http://stackoverflow.com/questions/356126/how-can-you-automatically-remove-trailing-whitespace-in-vim
function! <SID>StripTrailingWhitespaces()
let l = line(".")
let c = col(".")
%s/\s\+$//e
call cursor(l, c)
endfunction
"autocmd FileType c,cpp,java,php,ruby,python,sass,css,less,scss autocmd BufWritePre <buffer> :call <SID>StripTrailingWhitespaces()
set nocompatible
let mapleader = ";"
set number
set ruler
syntax on
" Set encoding
set encoding=utf-8
export CLICOLOR="true"
export GIT_PS1_SHOWDIRTYSTATE="true"
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
eval "$(rbenv init -)"
[[ -e /usr/local/etc/bash_completion.d/git-completion.bash ]] && source /usr/local/etc/bash_completion.d/git-completion.bash
function git_branch {
echo $(__git_ps1) | sed "s/(\(.*\))/ [\1]/"
if has("gui_macvim")
" Fullscreen takes up entire screen
set fuoptions=maxhorz,maxvert
" Command-T for CommandT
"macmenu &File.New\ Tab key=<D-T>
"map <D-t> :CommandT<CR>
"imap <D-t> <Esc>:CommandT<CR>
" Command-Return for fullscreen
if has("gui_macvim")
" Fullscreen takes up entire screen
set fuoptions=maxhorz,maxvert
"key mapping for window navigation
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
endif
##################################################
# Fancy PWD display function
##################################################
# The home directory (HOME) is replaced with a ~
# The last pwdmaxlen characters of the PWD are displayed
# Leading partial directory names are striped off
# /home/me/stuff -> ~/stuff if USER=me
# /usr/share/big_dir_name -> ../share/big_dir_name if pwdmaxlen=20
##################################################
bash_prompt_command() {