Initial commit.

+ vim config files
+ git config files
This commit is contained in:
Nick Nisi
2012-04-11 23:20:10 -05:00
commit 4f885fd99c
29 changed files with 984 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.netrwhist

63
.gitmodules vendored Normal file
View File

@@ -0,0 +1,63 @@
[submodule "vim/bundle/vim-endwise"]
path = vim/bundle/vim-endwise
url = https://github.com/tpope/vim-endwise.git
[submodule "vim/bundle/vim-rake"]
path = vim/bundle/vim-rake
url = https://github.com/tpope/vim-rake.git
[submodule "vim/bundle/vim-fugitive"]
path = vim/bundle/vim-fugitive
url = https://github.com/tpope/vim-fugitive.git
[submodule "vim/bundle/nerdcommenter"]
path = vim/bundle/nerdcommenter
url = https://github.com/scrooloose/nerdcommenter.git
[submodule "vim/bundle/scss-syntax"]
path = vim/bundle/scss-syntax
url = https://github.com/cakebaker/scss-syntax.vim.git
[submodule "vim/bundle/vim-ragtag"]
path = vim/bundle/vim-ragtag
url = https://github.com/tpope/vim-ragtag.git
[submodule "vim/bundle/vim-jquery"]
path = vim/bundle/vim-jquery
url = https://github.com/itspriddle/vim-jquery.git
[submodule "vim/bundle/vim-ruby-sinatra"]
path = vim/bundle/vim-ruby-sinatra
url = https://github.com/hallison/vim-ruby-sinatra.git
[submodule "vim/bundle/vim-node"]
path = vim/bundle/vim-node
url = https://github.com/mmalecki/vim-node.js.git
[submodule "vim/bundle/vim-javascript"]
path = vim/bundle/vim-javascript
url = https://github.com/pangloss/vim-javascript.git
[submodule "vim/bundle/vim-markdown"]
path = vim/bundle/vim-markdown
url = https://github.com/tpope/vim-markdown.git
[submodule "vim/bundle/vim-cucumber"]
path = vim/bundle/vim-cucumber
url = https://github.com/tpope/vim-cucumber.git
[submodule "vim/bundle/vim-ruby"]
path = vim/bundle/vim-ruby
url = https://github.com/vim-ruby/vim-ruby.git
[submodule "vim/bundle/jshint"]
path = vim/bundle/jshint
url = https://github.com/manalang/jshint.vim.git
[submodule "vim/bundle/ctrlp"]
path = vim/bundle/ctrlp
url = https://github.com/kien/ctrlp.vim.git
[submodule "vim/bundle/nerdtree"]
path = vim/bundle/nerdtree
url = https://github.com/scrooloose/nerdtree.git
[submodule "vim/bundle/vim-powerline"]
path = vim/bundle/vim-powerline
url = https://github.com/Lokaltog/vim-powerline.git
[submodule "vim/bundle/delimitMate"]
path = vim/bundle/delimitMate
url = https://github.com/Raimondi/delimitMate.git
[submodule "vim/bundle/vim-less"]
path = vim/bundle/vim-less
url = https://github.com/groenewege/vim-less.git
[submodule "vim/bundle/ZoomWin"]
path = vim/bundle/ZoomWin
url = https://github.com/vim-scripts/ZoomWin.git
[submodule "vim/bundle/Kwbd"]
path = vim/bundle/Kwbd
url = https://github.com/rgarver/Kwbd.vim.git

69
gitconfig Normal file
View File

@@ -0,0 +1,69 @@
# Nick Nisi
# gitconfig
[user]
name = Nick Nisi
email = nick@nisi.org
[github]
user = "nicknisi"
token = "a56935f3a5cece2592cb96a32a3d5a00"
[alias]
# aa = !git ls-files -d | xargs -r git rm && git ls-files -m -o --exclude-standard | xargs -r git add
ci = commit -a
co = checkout
s = status --short
ss = status
br = branch
# show a pretty log graph
lg = log --graph --pretty=oneline --abbrev-commit --decorate
# show files that have changed between two branches (git dbr master..branch)
dbr = diff --name-status
# stash shortcuts
sp = stash pop
sw = stash save
sl = stash list
# grep commands
# 'diff grep'
dg = "!sh -c 'git ls-files -m | grep $1 | xargs git diff' -"
# 'checkout grep'
cg = "!sh -c 'git ls-files -m | grep $1 | xargs git checkout ' -"
# add grep
ag = "!sh -c 'git ls-files -m -o --exclude-standard | grep $1 | xargs git add' -"
# add all
aa = !git ls-files -d | xargs git rm && git ls-files -m -o --exclude-standard | xargs git add
# remove grep - Remove found files that are NOT under version control
rg = "!sh -c 'git ls-files --others --exclude-standard | grep $1 | xargs rm' -"
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = auto
[color "branch"]
current = green bold
local = green
remote = red bold
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = green bold
changed = yellow bold
untracked = red
[color "sh"]
branch = yellow
[push]
# push will only do the current branch, not all branches
default = current
[branch]
# set up 'git pull' to rebase instead of merge
autosetuprebase = always
[diff]
renames = copies
mnemonicprefix = true
[core]
excludesfile = /Users/pollen/.gitignore_global

2
gitignore_global Normal file
View File

@@ -0,0 +1,2 @@
.DS_Store
Thumbs.db

245
vim/autoload/pathogen.vim Normal file
View File

@@ -0,0 +1,245 @@
" pathogen.vim - path option manipulation
" Maintainer: Tim Pope <http://tpo.pe/>
" Version: 2.0
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
"
" For management of individually installed plugins in ~/.vim/bundle (or
" ~\vimfiles\bundle), adding `call pathogen#infect()` to your .vimrc
" prior to `filetype plugin indent on` is the only other setup necessary.
"
" The API is documented inline below. For maximum ease of reading,
" :set foldmethod=marker
if exists("g:loaded_pathogen") || &cp
finish
endif
let g:loaded_pathogen = 1
" Point of entry for basic default usage. Give a directory name to invoke
" pathogen#runtime_append_all_bundles() (defaults to "bundle"), or a full path
" to invoke pathogen#runtime_prepend_subdirectories(). Afterwards,
" pathogen#cycle_filetype() is invoked.
function! pathogen#infect(...) abort " {{{1
let source_path = a:0 ? a:1 : 'bundle'
if source_path =~# '[\\/]'
call pathogen#runtime_prepend_subdirectories(source_path)
else
call pathogen#runtime_append_all_bundles(source_path)
endif
call pathogen#cycle_filetype()
endfunction " }}}1
" Split a path into a list.
function! pathogen#split(path) abort " {{{1
if type(a:path) == type([]) | return a:path | endif
let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
endfunction " }}}1
" Convert a list to a path.
function! pathogen#join(...) abort " {{{1
if type(a:1) == type(1) && a:1
let i = 1
let space = ' '
else
let i = 0
let space = ''
endif
let path = ""
while i < a:0
if type(a:000[i]) == type([])
let list = a:000[i]
let j = 0
while j < len(list)
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
let path .= ',' . escaped
let j += 1
endwhile
else
let path .= "," . a:000[i]
endif
let i += 1
endwhile
return substitute(path,'^,','','')
endfunction " }}}1
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
function! pathogen#legacyjoin(...) abort " {{{1
return call('pathogen#join',[1] + a:000)
endfunction " }}}1
" Remove duplicates from a list.
function! pathogen#uniq(list) abort " {{{1
let i = 0
let seen = {}
while i < len(a:list)
if (a:list[i] ==# '' && exists('empty')) || has_key(seen,a:list[i])
call remove(a:list,i)
elseif a:list[i] ==# ''
let i += 1
let empty = 1
else
let seen[a:list[i]] = 1
let i += 1
endif
endwhile
return a:list
endfunction " }}}1
" \ on Windows unless shellslash is set, / everywhere else.
function! pathogen#separator() abort " {{{1
return !exists("+shellslash") || &shellslash ? '/' : '\'
endfunction " }}}1
" Convenience wrapper around glob() which returns a list.
function! pathogen#glob(pattern) abort " {{{1
let files = split(glob(a:pattern),"\n")
return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")')
endfunction "}}}1
" Like pathogen#glob(), only limit the results to directories.
function! pathogen#glob_directories(pattern) abort " {{{1
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
endfunction "}}}1
" Turn filetype detection off and back on again if it was already enabled.
function! pathogen#cycle_filetype() " {{{1
if exists('g:did_load_filetypes')
filetype off
filetype on
endif
endfunction " }}}1
" Checks if a bundle is 'disabled'. A bundle is considered 'disabled' if
" its 'basename()' is included in g:pathogen_disabled[]' or ends in a tilde.
function! pathogen#is_disabled(path) " {{{1
if a:path =~# '\~$'
return 1
elseif !exists("g:pathogen_disabled")
return 0
endif
let sep = pathogen#separator()
return index(g:pathogen_disabled, strpart(a:path, strridx(a:path, sep)+1)) != -1
endfunction "}}}1
" Prepend all subdirectories of path to the rtp, and append all 'after'
" directories in those subdirectories.
function! pathogen#runtime_prepend_subdirectories(path) " {{{1
let sep = pathogen#separator()
let before = filter(pathogen#glob_directories(a:path.sep."*"), '!pathogen#is_disabled(v:val)')
let after = filter(pathogen#glob_directories(a:path.sep."*".sep."after"), '!pathogen#is_disabled(v:val[0:-7])')
let rtp = pathogen#split(&rtp)
let path = expand(a:path)
call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
let &rtp = pathogen#join(pathogen#uniq(before + rtp + after))
return &rtp
endfunction " }}}1
" For each directory in rtp, check for a subdirectory named dir. If it
" exists, add all subdirectories of that subdirectory to the rtp, immediately
" after the original directory. If no argument is given, 'bundle' is used.
" Repeated calls with the same arguments are ignored.
function! pathogen#runtime_append_all_bundles(...) " {{{1
let sep = pathogen#separator()
let name = a:0 ? a:1 : 'bundle'
if "\n".s:done_bundles =~# "\\M\n".name."\n"
return ""
endif
let s:done_bundles .= name . "\n"
let list = []
for dir in pathogen#split(&rtp)
if dir =~# '\<after$'
let list += filter(pathogen#glob_directories(substitute(dir,'after$',name,'').sep.'*[^~]'.sep.'after'), '!pathogen#is_disabled(v:val[0:-7])') + [dir]
else
let list += [dir] + filter(pathogen#glob_directories(dir.sep.name.sep.'*[^~]'), '!pathogen#is_disabled(v:val)')
endif
endfor
let &rtp = pathogen#join(pathogen#uniq(list))
return 1
endfunction
let s:done_bundles = ''
" }}}1
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
function! pathogen#helptags() " {{{1
let sep = pathogen#separator()
for dir in pathogen#split(&rtp)
if (dir.sep)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir.sep.'doc') == 2 && !empty(glob(dir.sep.'doc'.sep.'*')) && (!filereadable(dir.sep.'doc'.sep.'tags') || filewritable(dir.sep.'doc'.sep.'tags'))
helptags `=dir.'/doc'`
endif
endfor
endfunction " }}}1
command! -bar Helptags :call pathogen#helptags()
" Like findfile(), but hardcoded to use the runtimepath.
function! pathogen#runtime_findfile(file,count) "{{{1
let rtp = pathogen#join(1,pathogen#split(&rtp))
return fnamemodify(findfile(a:file,rtp,a:count),':p')
endfunction " }}}1
" Backport of fnameescape().
function! pathogen#fnameescape(string) " {{{1
if exists('*fnameescape')
return fnameescape(a:string)
elseif a:string ==# '-'
return '\-'
else
return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','')
endif
endfunction " }}}1
function! s:find(count,cmd,file,lcd) " {{{1
let rtp = pathogen#join(1,pathogen#split(&runtimepath))
let file = pathogen#runtime_findfile(a:file,a:count)
if file ==# ''
return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'"
elseif a:lcd
let path = file[0:-strlen(a:file)-2]
execute 'lcd `=path`'
return a:cmd.' '.pathogen#fnameescape(a:file)
else
return a:cmd.' '.pathogen#fnameescape(file)
endif
endfunction " }}}1
function! s:Findcomplete(A,L,P) " {{{1
let sep = pathogen#separator()
let cheats = {
\'a': 'autoload',
\'d': 'doc',
\'f': 'ftplugin',
\'i': 'indent',
\'p': 'plugin',
\'s': 'syntax'}
if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0])
let request = cheats[a:A[0]].a:A[1:-1]
else
let request = a:A
endif
let pattern = substitute(request,'\'.sep,'*'.sep,'g').'*'
let found = {}
for path in pathogen#split(&runtimepath)
let path = expand(path, ':p')
let matches = split(glob(path.sep.pattern),"\n")
call map(matches,'isdirectory(v:val) ? v:val.sep : v:val')
call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]')
for match in matches
let found[match] = 1
endfor
endfor
return sort(keys(found))
endfunction " }}}1
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(<count>,'edit<bang>',<q-args>,0)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(<count>,'edit<bang>',<q-args>,0)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(<count>,'edit<bang>',<q-args>,1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(<count>,'split',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(<count>,'vsplit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(<count>,'tabedit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(<count>,'pedit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(<count>,'read',<q-args>,<bang>1)
" vim:set ft=vim ts=8 sw=2 sts=2:

1
vim/bundle/Kwbd Submodule

Submodule vim/bundle/Kwbd added at ed6d180b44

1
vim/bundle/ZoomWin Submodule

Submodule vim/bundle/ZoomWin added at e7ee18e2e7

1
vim/bundle/ctrlp Submodule

Submodule vim/bundle/ctrlp added at cb25e84cce

1
vim/bundle/jshint Submodule

Submodule vim/bundle/jshint added at da21f0eb65

1
vim/bundle/nerdtree Submodule

Submodule vim/bundle/nerdtree added at 2cb0fc78fb

1
vim/bundle/vim-jquery Submodule

Submodule vim/bundle/vim-jquery added at 61890d8e5b

1
vim/bundle/vim-less Submodule

Submodule vim/bundle/vim-less added at aaf0c284ad

1
vim/bundle/vim-node Submodule

Submodule vim/bundle/vim-node added at 0b5146fa9b

1
vim/bundle/vim-ragtag Submodule

Submodule vim/bundle/vim-ragtag added at 1b82b6726c

1
vim/bundle/vim-rake Submodule

Submodule vim/bundle/vim-rake added at af98f57371

1
vim/bundle/vim-ruby Submodule

Submodule vim/bundle/vim-ruby added at 90f352333e

213
vim/colors/ir_black.vim Normal file
View File

@@ -0,0 +1,213 @@
" ir_black color scheme
" More at: http://blog.infinitered.com
" ********************************************************************************
" Standard colors used in all ir_black themes:
" Note, x:x:x are RGB values
"
" normal: #f6f3e8
"
" string: #A8FF60 168:255:96
" string inner (punc, code, etc): #00A0A0 0:160:160
" number: #FF73FD 255:115:253
" comments: #7C7C7C 124:124:124
" keywords: #96CBFE 150:203:254
" operators: white
" class: #FFFFB6 255:255:182
" method declaration name: #FFD2A7 255:210:167
" regular expression: #E9C062 233:192:98
" regexp alternate: #FF8000 255:128:0
" regexp alternate 2: #B18A3D 177:138:61
" variable: #C6C5FE 198:197:254
"
" Misc colors:
" red color (used for whatever): #FF6C60 255:108:96
" light red: #FFB6B0 255:182:176
"
" brown: #E18964 good for special
"
" lightpurpleish: #FFCCFF
"
" Interface colors:
" background color: black
" cursor (where underscore is used): #FFA560 255:165:96
" cursor (where block is used): white
" visual selection: #1D1E2C
" current line: #151515 21:21:21
" search selection: #07281C 7:40:28
" line number: #3D3D3D 61:61:61
" ********************************************************************************
" The following are the preferred 16 colors for your terminal
" Colors Bright Colors
" Black #4E4E4E #7C7C7C
" Red #FF6C60 #FFB6B0
" Green #A8FF60 #CEFFAB
" Yellow #FFFFB6 #FFFFCB
" Blue #96CBFE #B5DCFE
" Magenta #FF73FD #FF9CFE
" Cyan #C6C5FE #DFDFFE
" White #EEEEEE #FFFFFF
" ********************************************************************************
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "ir_black"
"hi Example guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
" General colors
hi Normal guifg=#f6f3e8 guibg=black gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi NonText guifg=#4a4a59 guibg=black gui=NONE ctermfg=black ctermbg=NONE cterm=NONE
hi Cursor guifg=black guibg=white gui=NONE ctermfg=black ctermbg=white cterm=reverse
hi LineNr guifg=#3D3D3D guibg=black gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE
hi VertSplit guifg=#202020 guibg=#202020 gui=NONE ctermfg=darkgray ctermbg=darkgray cterm=NONE
hi StatusLine guifg=#CCCCCC guibg=#202020 gui=italic ctermfg=white ctermbg=darkgray cterm=NONE
hi StatusLineNC guifg=black guibg=#202020 gui=NONE ctermfg=blue ctermbg=darkgray cterm=NONE
hi Folded guifg=#a0a8b0 guibg=#384048 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title guifg=#f6f3e8 guibg=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=NONE
hi Visual guifg=NONE guibg=#262D51 gui=NONE ctermfg=NONE ctermbg=NONE cterm=REVERSE
hi SpecialKey guifg=#4a4a59 guibg=black gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi WildMenu guifg=green guibg=yellow gui=NONE ctermfg=black ctermbg=yellow cterm=NONE
hi PmenuSbar guifg=black guibg=white gui=NONE ctermfg=black ctermbg=white cterm=NONE
"hi Ignore guifg=gray guibg=black gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error guifg=NONE guibg=NONE gui=undercurl ctermfg=white ctermbg=red cterm=NONE guisp=#FF6C60 " undercurl color
hi ErrorMsg guifg=white guibg=#FF6C60 gui=BOLD ctermfg=white ctermbg=red cterm=NONE
hi WarningMsg guifg=white guibg=#FF6C60 gui=BOLD ctermfg=white ctermbg=red cterm=NONE
hi LongLineWarning guifg=NONE guibg=#371F1C gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
" Message displayed in lower left, such as --INSERT--
hi ModeMsg guifg=black guibg=#C6C5FE gui=BOLD ctermfg=black ctermbg=cyan cterm=BOLD
if version >= 700 " Vim 7.x specific colors
hi CursorLine guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=NONE cterm=BOLD
hi CursorColumn guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=NONE cterm=BOLD
hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=BOLD ctermfg=white ctermbg=darkgray cterm=NONE
hi Pmenu guifg=#f6f3e8 guibg=#444444 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#cae682 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Search guifg=NONE guibg=#2F2F00 gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
endif
" Syntax highlighting
hi Comment guifg=#7C7C7C guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE
hi String guifg=#A8FF60 guibg=NONE gui=NONE ctermfg=green ctermbg=NONE cterm=NONE
hi Number guifg=#FF73FD guibg=NONE gui=NONE ctermfg=magenta ctermbg=NONE cterm=NONE
hi Keyword guifg=#96CBFE guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE
hi PreProc guifg=#96CBFE guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE
hi Conditional guifg=#6699CC guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE " if else end
hi Todo guifg=#8f8f8f guibg=NONE gui=NONE ctermfg=red ctermbg=NONE cterm=NONE
hi Constant guifg=#99CC99 guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE
hi Identifier guifg=#C6C5FE guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE
hi Function guifg=#FFD2A7 guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE
hi Type guifg=#FFFFB6 guibg=NONE gui=NONE ctermfg=yellow ctermbg=NONE cterm=NONE
hi Statement guifg=#6699CC guibg=NONE gui=NONE ctermfg=lightblue ctermbg=NONE cterm=NONE
hi Special guifg=#E18964 guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE
hi Delimiter guifg=#00A0A0 guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE
hi Operator guifg=white guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE
hi link Character Constant
hi link Boolean Constant
hi link Float Number
hi link Repeat Statement
hi link Label Statement
hi link Exception Statement
hi link Include PreProc
hi link Define PreProc
hi link Macro PreProc
hi link PreCondit PreProc
hi link StorageClass Type
hi link Structure Type
hi link Typedef Type
hi link Tag Special
hi link SpecialChar Special
hi link SpecialComment Special
hi link Debug Special
" Special for Ruby
hi rubyRegexp guifg=#B18A3D guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE
hi rubyRegexpDelimiter guifg=#FF8000 guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE
hi rubyEscape guifg=white guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE
hi rubyInterpolationDelimiter guifg=#00A0A0 guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE
hi rubyControl guifg=#6699CC guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE "and break, etc
"hi rubyGlobalVariable guifg=#FFCCFF guibg=NONE gui=NONE ctermfg=lightblue ctermbg=NONE cterm=NONE "yield
hi rubyStringDelimiter guifg=#336633 guibg=NONE gui=NONE ctermfg=lightgreen ctermbg=NONE cterm=NONE
"rubyInclude
"rubySharpBang
"rubyAccess
"rubyPredefinedVariable
"rubyBoolean
"rubyClassVariable
"rubyBeginEnd
"rubyRepeatModifier
"hi link rubyArrayDelimiter Special " [ , , ]
"rubyCurlyBlock { , , }
hi link rubyClass Keyword
hi link rubyModule Keyword
hi link rubyKeyword Keyword
hi link rubyOperator Operator
hi link rubyIdentifier Identifier
hi link rubyInstanceVariable Identifier
hi link rubyGlobalVariable Identifier
hi link rubyClassVariable Identifier
hi link rubyConstant Type
" Special for Java
" hi link javaClassDecl Type
hi link javaScopeDecl Identifier
hi link javaCommentTitle javaDocSeeTag
hi link javaDocTags javaDocSeeTag
hi link javaDocParam javaDocSeeTag
hi link javaDocSeeTagParam javaDocSeeTag
hi javaDocSeeTag guifg=#CCCCCC guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE
hi javaDocSeeTag guifg=#CCCCCC guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE
"hi javaClassDecl guifg=#CCFFCC guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE
" Special for XML
hi link xmlTag Keyword
hi link xmlTagName Conditional
hi link xmlEndTag Identifier
" Special for HTML
hi link htmlTag Keyword
hi link htmlTagName Conditional
hi link htmlEndTag Identifier
" Special for Javascript
hi link javaScriptNumber Number
" Special for Python
"hi link pythonEscape Keyword
" Special for CSharp
hi link csXmlTag Keyword
" Special for PHP

73
vim/update_bundles Executable file
View File

@@ -0,0 +1,73 @@
#!/usr/bin/env ruby
# script based on Tammer Saleh's blog post
# http://tammersaleh.com/posts/the-modern-vim-config-with-pathogen
require 'fileutils'
require 'open-uri'
git_bundles = [
"https://github.com/tpope/vim-rake.git",
"https://github.com/tpope/vim-endwise.git",
"https://github.com/tpope/vim-fugitive.git",
#"https://github.com/scrooloose/syntastic.git",
"https://github.com/scrooloose/nerdcommenter.git",
"https://github.com/cakebaker/scss-syntax.vim.git",
"https://github.com/tpope/vim-rvm.git",
#"https://github.com/tpope/vim-surround.git",
"https://github.com/tpope/vim-ragtag.git",
"https://github.com/itspriddle/vim-jquery.git",
"https://github.com/hallison/vim-ruby-sinatra.git",
"https://github.com/tpope/vim-vividchalk.git",
"https://github.com/mmalecki/vim-node.js.git",
"https://github.com/pangloss/vim-javascript.git",
"https://github.com/tpope/vim-markdown.git",
#"https://github.com/tpope/vim-git.git",
"https://github.com/tpope/vim-cucumber.git",
"https://github.com/vim-ruby/vim-ruby.git",
"https://github.com/manalang/jshint.vim.git",
# "https://github.com/tpope/vim-rails.git",
"https://github.com/kien/ctrlp.vim.git",
"https://github.com/scrooloose/nerdtree.git",
"https://github.com/vim-scripts/ZoomWin.git",
"https://github.com/rgarver/Kwbd.vim.git",
"https://github.com/Lokaltog/vim-powerline.git",
"https://github.com/Raimondi/delimitMate.git",
"https://github.com/goatslacker/mango.vim.git",
"https://github.com/altercation/vim-colors-solarized.git",
"https://github.com/marcus/vim-mustang",
"https://github.com/altercation/vim-colors-solarized.git",
"https://github.com/sjl/badwolf.git",
"https://github.com/groenewege/vim-less.git"
]
vim_org_scripts = [
#["autoclose", "10873", "plugin"]
]
bundles_dir = File.join(File.dirname(__FILE__), 'bundle')
FileUtils.cd(bundles_dir)
puts "clearing out bundles directory"
Dir["*"].each do |dir|
FileUtils.rm_rf dir
end
git_bundles.each do |url|
dir = url.split('/').last.sub(/\.git$/, '')
puts "unpacking #{url} #{dir}"
`git clone #{url} #{dir}`
#FileUtils.rm_rf File.join(dir, '.git')
end
vim_org_scripts.each do |name, script_id, script_type|
puts "downloading #{name}"
local_file = File.join(name, script_type, "#{name}.vim")
FileUtils::mkdir_p File.dirname(local_file)
File.open(local_file, "w") do |file|
file << open("http://www.vim.org/scripts/download_script.php?src_id=#{script_id}").read
end
end
puts "\nbundle installation complete\n"

297
vimrc Normal file
View File

@@ -0,0 +1,297 @@
" vim settings
" Pathogen
" loads all plugins places in the ~/.vim/bundle directory
call pathogen#infect()
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"set winwidth=120
set nocompatible " not compatible with vi
set autoread " detect when a file is changed
" make backspace behave in a sane manner
set backspace=indent,eol,start
" set a map leader for more key combos
let mapleader = ","
let g:mapleader = ","
" change history to 1000
set history=10000
" Tab control
set smarttab
set expandtab
set shiftwidth=4
set tabstop=4
set softtabstop=4
" allow matching of if/end, etc. with %
runtime macros/matchit.vim
" Enable file type detection and do language dependent indenting
filetype plugin indent on
" file type specific settings
if has("autocmd")
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType make setlocal ts=8 sts=8 sw=8 noexpandtab
autocmd FileType ruby setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType html setlocal ts=4 sts=4 sw=4 expandtab
autocmd WinEnter * setlocal cursorline
autocmd WinLeave * setlocal nocursorline
" automatically resize panes on resize
autocmd VimResized * exe "normal! \<c-w>="
"autocmd BufWritePost .vimrc source $MYVIMRC
endif
" code folding settings
set foldmethod=syntax " fold based on indent
set foldnestmax=10 " deepest fold is 10 levels
set nofoldenable " don't fold by default
set foldlevel=1
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => User Interface
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set so=7 " set 7 lines to the cursors - when moving vertical
set wildmenu " enhanced command line completion
set hidden " current buffer can be put into background
set showcmd " show incomplete commands
set noshowmode " don't show which mode disabled for PowerLine
set wildmode=list:longest " complete files like a shell
set scrolloff=3 " lines of text around cursor
set shell=/bin/bash
set ruler " show postiion in file
set cmdheight=1 " command bar height
set title " set terminal title
" Searching
set ignorecase " case insensitive searching
set smartcase " case-sensitive if expresson contains a capital letter
set hlsearch
set incsearch " set incremental search, like modern browsers
set nolazyredraw " don't redraw while executing macros
set magic " Set magic on, for regex
set showmatch " show matching braces
set mat=2 " how many tenths of a second to blink
" error bells
set noerrorbells
set visualbell
set t_vb=
set tm=500
" switch syntax highlighting on
syntax on
set background=dark
"colorscheme molokai
colorscheme ir_black
"colorscheme mango
"colorscheme mustang
"colorscheme vividchalk
"colorscheme desert
"colorscheme solarized
set number " show line numbers
set wrap " turn on line wrapping
"set nowrap "turn off line wrapping
set wrapmargin=8 " wrap lines when coming within n characters from side
set linebreak " set soft wrapping
set showbreak=" show ellipsis at breaking
set autoindent " automatically set indent of new line
set encoding=utf8
set t_Co=256 " Explicitly tell vim that the terminal supports 256 colors"
try
lang en_US
catch
endtry
" set ffs=unix,mac,dos "default file types
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Files, backups, and undo
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"set nobackup
"set nowritebackup
"set noswapfile
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => StatusLine
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set laststatus=2 " show the satus line all the time
"set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ %{fugitive#statusline()}\ Dir:%r%{CurDir()}%h\ \ \ Line:%l/%L\ Column:%c
" set statusline=[%n]\ %<%.99f\ %h%w%m%r%y\ %{fugitive#statusline()}%=%-16(\ %l:%L,\ %c-%v\ %)%P
function! CurDir()
let curdir = getcwd()
return curdir
endfunction
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Mappings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" General mappings/shortcuts for functionality
" Additional, plugin-specific mappings are located under
" the plugins section
" fast saving
nmap <leader>w :w!<cr>
" edit ~/.vimrc
map <leader>e :e! ~/.vimrc<cr>
" clear highlighted search
noremap <space> :set hlsearch! hlsearch?<cr>
" toggle invisible characters
set invlist
set listchars=tab:▸\ ,eol,trail:⋅,extends:,precedes:
set showbreak=
nmap <leader>l :set list!<cr>
" Textmate style indentation
vmap <leader>[ <gv
vmap <leader>] >gv
nmap <leader>[ <<
nmap <leader>] >>
" easier begin/end nav map
"noremap HH ^
"noremap LL $
" buffer shortcuts
nmap <leader>n :bn<cr> " go to next buffer
nmap <leader>p :bp<cr> " go to prev buffer
nmap <leader>q :bd<cr> " close the current buffer
" disable arrow keys (forced learning)
"noremap <Up> ""
"noremap! <Up> <Esc>
"noremap <Down> ""
"noremap! <Down> <Esc>
"noremap <Left> ""
"noremap! <Left> <Esc>
"noremap <Right> ""
"noremap! <Right> <Esc>
" Window movement shortcuts
" move to the window in the direction shown, or create a new window
function! WinMove(key)
let t:curwin = winnr()
exec "wincmd ".a:key
if (t:curwin == winnr())
if (match(a:key,'[jk]'))
wincmd v
else
wincmd s
endif
exec "wincmd ".a:key
endif
endfunction
map <silent> <C-h> :call WinMove('h')<cr>
map <silent> <C-j> :call WinMove('j')<cr>
map <silent> <C-k> :call WinMove('k')<cr>
map <silent> <C-l> :call WinMove('l')<cr>
map <leader>wc :wincmd q<cr>
map <leader>wr <C-W>r
" window movement shortcuts
"map <C-h> <C-w>h " go to window left
"map <C-j> <C-w>j " go to window down
"map <C-k> <C-w>k " go to window up
"map <C-l> <C-w>l " go to window right
" equalize windows
map <leader>= <C-w>=
" Edit Shortcuts
" these automatically populate the current filepath
cnoremap %% <C-R>=expand('%:h').'/'<cr>
map <leader>ew :e %%
map <leader>es :sp %%
map <leader>ev :vsp %%
map <leader>et :tabe %%
" Moving shortcuts
" Instead of pressing g$, press command
vmap <D-j> gj
vmap <D-k> gk
vmap <D-4> g$
vmap <D-6> g^
vmap <D-0> g^
nmap <D-j> gj
nmap <D-k> gk
nmap <D-4> g$
nmap <D-6> g^
nmap <D-0> g^
" toggle cursor line
nnoremap <leader>i :set cursorline!<cr>
" remap jj in insert mode to ESC
"inoremap jj <Esc>
" use space bar to toggle folds
"nnoremap <Space> za
"vnoremap <Space> za
" scroll the viewport faster
nnoremap <C-e> 3<C-e>
nnoremap <C-y> 3<C-y>
" moving up and down work as you would expect
nnoremap <silent> j gj
nnoremap <silent> k gk
" toggle paste
map <leader>v :set paste!<cr>
" find out what syntax group the selected text belongs to
nmap <A-S-P> :call SynStack()<cr>
function! SynStack()
if !exists("*Synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name"')
endfunction
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Plugins
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Powerline settings
let g:Powerline_symbols = 'fancy'
let g:Powerline_stl_path_style = 'filename'
" Toggle NERDTree
nmap <silent> <leader>k :NERDTreeToggle<cr>
" expand to the path of the file in the current buffer
nmap <silent> <leader>y :NERDTreeFind<cr>
" map fuzzyfinder (CtrlP) plugin
nmap <silent> <leader>t :CtrlP<cr>
nmap <silent> <leader>r :CtrlPBuffer<cr>
" CtrlP ignore patterns
let g:ctrlp_custom_ignore = '\.git$|\.hg$|\.svn$'
" Kwbd
nmap <leader>qq :Kwbd<cr>