From 4f885fd99c30282029918109a863acf19aef4ac3 Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Wed, 11 Apr 2012 23:20:10 -0500 Subject: [PATCH] Initial commit. + vim config files + git config files --- .gitignore | 1 + .gitmodules | 63 ++++++++ gitconfig | 69 +++++++++ gitignore_global | 2 + vim/autoload/pathogen.vim | 245 +++++++++++++++++++++++++++++ vim/bundle/Kwbd | 1 + vim/bundle/ZoomWin | 1 + vim/bundle/ctrlp | 1 + vim/bundle/delimitMate | 1 + vim/bundle/jshint | 1 + vim/bundle/nerdcommenter | 1 + vim/bundle/nerdtree | 1 + vim/bundle/scss-syntax | 1 + vim/bundle/vim-cucumber | 1 + vim/bundle/vim-endwise | 1 + vim/bundle/vim-fugitive | 1 + vim/bundle/vim-javascript | 1 + vim/bundle/vim-jquery | 1 + vim/bundle/vim-less | 1 + vim/bundle/vim-markdown | 1 + vim/bundle/vim-node | 1 + vim/bundle/vim-powerline | 1 + vim/bundle/vim-ragtag | 1 + vim/bundle/vim-rake | 1 + vim/bundle/vim-ruby | 1 + vim/bundle/vim-ruby-sinatra | 1 + vim/colors/ir_black.vim | 213 ++++++++++++++++++++++++++ vim/update_bundles | 73 +++++++++ vimrc | 297 ++++++++++++++++++++++++++++++++++++ 29 files changed, 984 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 gitconfig create mode 100644 gitignore_global create mode 100644 vim/autoload/pathogen.vim create mode 160000 vim/bundle/Kwbd create mode 160000 vim/bundle/ZoomWin create mode 160000 vim/bundle/ctrlp create mode 160000 vim/bundle/delimitMate create mode 160000 vim/bundle/jshint create mode 160000 vim/bundle/nerdcommenter create mode 160000 vim/bundle/nerdtree create mode 160000 vim/bundle/scss-syntax create mode 160000 vim/bundle/vim-cucumber create mode 160000 vim/bundle/vim-endwise create mode 160000 vim/bundle/vim-fugitive create mode 160000 vim/bundle/vim-javascript create mode 160000 vim/bundle/vim-jquery create mode 160000 vim/bundle/vim-less create mode 160000 vim/bundle/vim-markdown create mode 160000 vim/bundle/vim-node create mode 160000 vim/bundle/vim-powerline create mode 160000 vim/bundle/vim-ragtag create mode 160000 vim/bundle/vim-rake create mode 160000 vim/bundle/vim-ruby create mode 160000 vim/bundle/vim-ruby-sinatra create mode 100644 vim/colors/ir_black.vim create mode 100755 vim/update_bundles create mode 100644 vimrc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a0e76af --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.netrwhist diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..63250d8 --- /dev/null +++ b/.gitmodules @@ -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 diff --git a/gitconfig b/gitconfig new file mode 100644 index 0000000..d66f7d3 --- /dev/null +++ b/gitconfig @@ -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 diff --git a/gitignore_global b/gitignore_global new file mode 100644 index 0000000..fafff2e --- /dev/null +++ b/gitignore_global @@ -0,0 +1,2 @@ +.DS_Store +Thumbs.db diff --git a/vim/autoload/pathogen.vim b/vim/autoload/pathogen.vim new file mode 100644 index 0000000..df4f22d --- /dev/null +++ b/vim/autoload/pathogen.vim @@ -0,0 +1,245 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" 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,'\\\@]','\\&','') + 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(,'edit',,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) + +" vim:set ft=vim ts=8 sw=2 sts=2: diff --git a/vim/bundle/Kwbd b/vim/bundle/Kwbd new file mode 160000 index 0000000..ed6d180 --- /dev/null +++ b/vim/bundle/Kwbd @@ -0,0 +1 @@ +Subproject commit ed6d180b44c93d6ed0dfdeeee81b74bc0a46c3cb diff --git a/vim/bundle/ZoomWin b/vim/bundle/ZoomWin new file mode 160000 index 0000000..e7ee18e --- /dev/null +++ b/vim/bundle/ZoomWin @@ -0,0 +1 @@ +Subproject commit e7ee18e2e7ed60509aa951cd34b57193fa14e5ab diff --git a/vim/bundle/ctrlp b/vim/bundle/ctrlp new file mode 160000 index 0000000..cb25e84 --- /dev/null +++ b/vim/bundle/ctrlp @@ -0,0 +1 @@ +Subproject commit cb25e84cce2845cf18146223e551f47f33a6ee1b diff --git a/vim/bundle/delimitMate b/vim/bundle/delimitMate new file mode 160000 index 0000000..a42dff4 --- /dev/null +++ b/vim/bundle/delimitMate @@ -0,0 +1 @@ +Subproject commit a42dff4ad85b0bb98fdbf0890a2b70ac15862c80 diff --git a/vim/bundle/jshint b/vim/bundle/jshint new file mode 160000 index 0000000..da21f0e --- /dev/null +++ b/vim/bundle/jshint @@ -0,0 +1 @@ +Subproject commit da21f0eb658d9af6696ee34a00c13d1717d85095 diff --git a/vim/bundle/nerdcommenter b/vim/bundle/nerdcommenter new file mode 160000 index 0000000..cb242a9 --- /dev/null +++ b/vim/bundle/nerdcommenter @@ -0,0 +1 @@ +Subproject commit cb242a9cb41e9fc9884caa2235c67d18b18e9067 diff --git a/vim/bundle/nerdtree b/vim/bundle/nerdtree new file mode 160000 index 0000000..2cb0fc7 --- /dev/null +++ b/vim/bundle/nerdtree @@ -0,0 +1 @@ +Subproject commit 2cb0fc78fb4c7a1db5f51c042a447cc50f09983d diff --git a/vim/bundle/scss-syntax b/vim/bundle/scss-syntax new file mode 160000 index 0000000..d4016f8 --- /dev/null +++ b/vim/bundle/scss-syntax @@ -0,0 +1 @@ +Subproject commit d4016f8b31f786d830bb59bb78979c6b5d5a200d diff --git a/vim/bundle/vim-cucumber b/vim/bundle/vim-cucumber new file mode 160000 index 0000000..8112713 --- /dev/null +++ b/vim/bundle/vim-cucumber @@ -0,0 +1 @@ +Subproject commit 8112713aaf04192d255761b3d19279f2b9582996 diff --git a/vim/bundle/vim-endwise b/vim/bundle/vim-endwise new file mode 160000 index 0000000..74306aa --- /dev/null +++ b/vim/bundle/vim-endwise @@ -0,0 +1 @@ +Subproject commit 74306aa18c03ee2fdb044609e6f0bc866872711d diff --git a/vim/bundle/vim-fugitive b/vim/bundle/vim-fugitive new file mode 160000 index 0000000..4fe6e46 --- /dev/null +++ b/vim/bundle/vim-fugitive @@ -0,0 +1 @@ +Subproject commit 4fe6e46a0ace8196aa1946b91cd02e853f8db9da diff --git a/vim/bundle/vim-javascript b/vim/bundle/vim-javascript new file mode 160000 index 0000000..a8ce721 --- /dev/null +++ b/vim/bundle/vim-javascript @@ -0,0 +1 @@ +Subproject commit a8ce721701fdd015695406f7df315f48bb447ebb diff --git a/vim/bundle/vim-jquery b/vim/bundle/vim-jquery new file mode 160000 index 0000000..61890d8 --- /dev/null +++ b/vim/bundle/vim-jquery @@ -0,0 +1 @@ +Subproject commit 61890d8e5ba8a873526fb91c6484aa445cc20b56 diff --git a/vim/bundle/vim-less b/vim/bundle/vim-less new file mode 160000 index 0000000..aaf0c28 --- /dev/null +++ b/vim/bundle/vim-less @@ -0,0 +1 @@ +Subproject commit aaf0c284adbda66e3b3c590615a6b6bde3870e43 diff --git a/vim/bundle/vim-markdown b/vim/bundle/vim-markdown new file mode 160000 index 0000000..3a99157 --- /dev/null +++ b/vim/bundle/vim-markdown @@ -0,0 +1 @@ +Subproject commit 3a99157473cb6508d1bc6f5980f928f27f52d65b diff --git a/vim/bundle/vim-node b/vim/bundle/vim-node new file mode 160000 index 0000000..0b5146f --- /dev/null +++ b/vim/bundle/vim-node @@ -0,0 +1 @@ +Subproject commit 0b5146fa9bd69cba9ce8690c164271a726e3b7b8 diff --git a/vim/bundle/vim-powerline b/vim/bundle/vim-powerline new file mode 160000 index 0000000..99277d9 --- /dev/null +++ b/vim/bundle/vim-powerline @@ -0,0 +1 @@ +Subproject commit 99277d9eed97a59cacc1db8c1dece2bcfd96d877 diff --git a/vim/bundle/vim-ragtag b/vim/bundle/vim-ragtag new file mode 160000 index 0000000..1b82b67 --- /dev/null +++ b/vim/bundle/vim-ragtag @@ -0,0 +1 @@ +Subproject commit 1b82b6726c9894acd37b70ec1cd451d412bdb0f7 diff --git a/vim/bundle/vim-rake b/vim/bundle/vim-rake new file mode 160000 index 0000000..af98f57 --- /dev/null +++ b/vim/bundle/vim-rake @@ -0,0 +1 @@ +Subproject commit af98f573714d0a3c2bec5ca8003762a32dafa925 diff --git a/vim/bundle/vim-ruby b/vim/bundle/vim-ruby new file mode 160000 index 0000000..90f3523 --- /dev/null +++ b/vim/bundle/vim-ruby @@ -0,0 +1 @@ +Subproject commit 90f352333e15342940394c780d70087f5bd65390 diff --git a/vim/bundle/vim-ruby-sinatra b/vim/bundle/vim-ruby-sinatra new file mode 160000 index 0000000..63eac10 --- /dev/null +++ b/vim/bundle/vim-ruby-sinatra @@ -0,0 +1 @@ +Subproject commit 63eac10884e97de1a692af772fcaf3064fcacd3a diff --git a/vim/colors/ir_black.vim b/vim/colors/ir_black.vim new file mode 100644 index 0000000..7dd36e4 --- /dev/null +++ b/vim/colors/ir_black.vim @@ -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 diff --git a/vim/update_bundles b/vim/update_bundles new file mode 100755 index 0000000..6c0a35c --- /dev/null +++ b/vim/update_bundles @@ -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" diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..b660797 --- /dev/null +++ b/vimrc @@ -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! \=" + "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 w :w! + +" edit ~/.vimrc +map e :e! ~/.vimrc + +" clear highlighted search +noremap :set hlsearch! hlsearch? + +" toggle invisible characters +set invlist +set listchars=tab:▸\ ,eol:¬,trail:⋅,extends:❯,precedes:❮ +set showbreak=↪ +nmap l :set list! + +" Textmate style indentation +vmap [ ] >gv +nmap [ << +nmap ] >> + +" easier begin/end nav map +"noremap HH ^ +"noremap LL $ + +" buffer shortcuts +nmap n :bn " go to next buffer +nmap p :bp " go to prev buffer +nmap q :bd " close the current buffer + +" disable arrow keys (forced learning) +"noremap "" +"noremap! +"noremap "" +"noremap! +"noremap "" +"noremap! +"noremap "" +"noremap! + +" 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 :call WinMove('h') +map :call WinMove('j') +map :call WinMove('k') +map :call WinMove('l') + +map wc :wincmd q +map wr r + +" window movement shortcuts +"map h " go to window left +"map j " go to window down +"map k " go to window up +"map l " go to window right + +" equalize windows +map = = + +" Edit Shortcuts +" these automatically populate the current filepath +cnoremap %% =expand('%:h').'/' +map ew :e %% +map es :sp %% +map ev :vsp %% +map et :tabe %% + +" Moving shortcuts +" Instead of pressing g$, press command +vmap gj +vmap gk +vmap g$ +vmap g^ +vmap g^ +nmap gj +nmap gk +nmap g$ +nmap g^ +nmap g^ + +" toggle cursor line +nnoremap i :set cursorline! + +" remap jj in insert mode to ESC +"inoremap jj + +" use space bar to toggle folds +"nnoremap za +"vnoremap za + +" scroll the viewport faster +nnoremap 3 +nnoremap 3 + +" moving up and down work as you would expect +nnoremap j gj +nnoremap k gk + +" toggle paste +map v :set paste! + +" find out what syntax group the selected text belongs to +nmap :call SynStack() +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 k :NERDTreeToggle +" expand to the path of the file in the current buffer +nmap y :NERDTreeFind + +" map fuzzyfinder (CtrlP) plugin +nmap t :CtrlP +nmap r :CtrlPBuffer + +" CtrlP ignore patterns +let g:ctrlp_custom_ignore = '\.git$|\.hg$|\.svn$' + +" Kwbd +nmap qq :Kwbd