Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

V I M F I L E S

  • Loading branch information...
commit 6c3b4ded7c11f8d3f29f320d6bb6c44540425f9f 0 parents
@mislav mislav authored
3  .gitignore
@@ -0,0 +1,3 @@
+/_temp
+/_backup
+/doc/tags
39 .gitmodules
@@ -0,0 +1,39 @@
+[submodule "bundle/fugitive"]
+ path = bundle/fugitive
+ url = https://github.com/tpope/vim-fugitive
+[submodule "bundle/haml"]
+ path = bundle/haml
+ url = https://github.com/tpope/vim-haml
+[submodule "bundle/javascript"]
+ path = bundle/javascript
+ url = https://github.com/pangloss/vim-javascript
+[submodule "bundle/markdown"]
+ path = bundle/markdown
+ url = https://github.com/tpope/vim-markdown
+[submodule "bundle/rails"]
+ path = bundle/rails
+ url = https://github.com/tpope/vim-rails
+[submodule "bundle/ruby"]
+ path = bundle/ruby
+ url = https://github.com/vim-ruby/vim-ruby
+[submodule "bundle/scss"]
+ path = bundle/scss
+ url = https://github.com/cakebaker/scss-syntax.vim
+[submodule "bundle/ack"]
+ path = bundle/ack
+ url = https://github.com/mileszs/ack.vim
+[submodule "bundle/endwise"]
+ path = bundle/endwise
+ url = https://github.com/tpope/vim-endwise
+[submodule "bundle/command-t"]
+ path = bundle/command-t
+ url = https://github.com/wincent/Command-T
+[submodule "bundle/coffee-script"]
+ path = bundle/coffee-script
+ url = https://github.com/kchmck/vim-coffee-script
+[submodule "bundle/commentary"]
+ path = bundle/commentary
+ url = https://github.com/tpope/vim-commentary
+[submodule "bundle/molokai"]
+ path = bundle/molokai
+ url = https://github.com/mrtazz/molokai.vim
47 README.md
@@ -0,0 +1,47 @@
+Mislav's vim configuration
+==========================
+
+Thanks to these guys:
+
+* [Gary Bernhardt](http://destroyallsoftware.com),
+* [Drew Neil](http://vimcasts.org),
+* [Tim Pope](http://tbaggery.com),
+* and the [Janus project](https://github.com/carlhuda/janus).
+
+My configuration uses [Pathogen](https://github.com/tpope/vim-pathogen) and git submodules.
+(But you don't need to care about any of that.)
+
+## Installation:
+
+1. Move your existing configuration somewhere else:
+ `mv .vim* .gvim* my_backup`
+2. Clone this repo into ".vim":
+ `git clone https://github.com/mislav/vimfiles ~/.vim`
+3. Go into ".vim" and run "rake":
+ `cd ~/.vim && rake`
+
+This will install "~/.vimrc" and "~/.gvimrc" symlinks that point to
+files inside the ".vim" directory.
+
+## Features:
+
+* 2 spaces, no tabs
+* incremental, case-insensitive search
+* 'Leader' character mapped to "," (comma)
+* `,f` opens file search via :CommandT plugin
+* `,,` switches between two last buffers
+* `<C-j/k/h/l>` switches between windows (no need to prepend `<C-w>`)
+* cursor keys for movement disabled!
+
+## Plugins:
+
+* ack
+* command-t
+* commentary
+* endwise
+* fugitive
+* markdown
+* rails
+* haml
+* scss
+* coffee-script
31 Rakefile
@@ -0,0 +1,31 @@
+task :default => [:tmp_dirs, :update, :command_t, :link]
+
+task :update do
+ sh "git submodule update --init"
+end
+
+task :link do
+ %w[vimrc gvimrc].each do |script|
+ dotfile = File.join(ENV['HOME'], ".#{script}")
+ if File.exist? dotfile
+ warn "~/.#{script} already exists"
+ else
+ ln_s File.join('.vim', script), dotfile
+ end
+ end
+end
+
+task :tmp_dirs do
+ mkdir_p "_backup"
+ mkdir_p "_temp"
+end
+
+task :command_t do
+ puts "Compiling Command-T plugin..."
+ Dir.chdir "bundle/command-t/ruby/command-t" do
+ ruby = %w[/usr/bin/ruby1.8 /usr/bin/ruby].find {|rb| File.executable? rb } || 'ruby'
+ rbenv = {'RBENV_VERSION' => 'system'}
+ sh rbenv, ruby, 'extconf.rb'
+ sh "make clean && make"
+ end
+end
245 autoload/pathogen.vim
@@ -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  bundle/ack
@@ -0,0 +1 @@
+Subproject commit 9895285042a2fd5691b2f6582aa979e4d1bdffea
1  bundle/coffee-script
@@ -0,0 +1 @@
+Subproject commit 5ea71f6a66dd6f68f7658d715fa0d03b3d461e7f
1  bundle/command-t
@@ -0,0 +1 @@
+Subproject commit e9a861b34674608ffa70e26063674245cd4e0927
1  bundle/commentary
@@ -0,0 +1 @@
+Subproject commit 62b72580aba57cb5185bd077ac7a905c1c6893ea
1  bundle/endwise
@@ -0,0 +1 @@
+Subproject commit 9a9d1994eaeae3f2f23da6bb71111782ab70276c
1  bundle/fugitive
@@ -0,0 +1 @@
+Subproject commit d95e6c61b53cef39d31e97d0ab4751138431a073
1  bundle/haml
@@ -0,0 +1 @@
+Subproject commit a995d4aabb794bd60028537ecb41ca7f2c738e65
1  bundle/javascript
@@ -0,0 +1 @@
+Subproject commit 9990a767695c78a44611ce33fb2dbc25c83d8827
1  bundle/markdown
@@ -0,0 +1 @@
+Subproject commit 5a70519e487c69d63ce501a6bd2beeacd3ae8035
1  bundle/molokai
@@ -0,0 +1 @@
+Subproject commit f78ffa3a3d2e6866c678734b878d09ab9bbdc6a6
1  bundle/rails
@@ -0,0 +1 @@
+Subproject commit e45164cbba5beee4bd65096dad31f31124a2cc18
1  bundle/ruby
@@ -0,0 +1 @@
+Subproject commit f265e6b09f943d79582244e487a4fa80a9584aa1
1  bundle/scss
@@ -0,0 +1 @@
+Subproject commit d4016f8b31f786d830bb59bb78979c6b5d5a200d
102 colors/vwilight.vim
@@ -0,0 +1,102 @@
+" Vim color file
+" Converted from Textmate theme Twilight using Coloration v0.2.5 (http://github.com/sickill/coloration)
+
+set background=dark
+highlight clear
+
+if exists("syntax_on")
+ syntax reset
+endif
+
+let g:colors_name = "Twilight"
+
+hi Cursor guifg=NONE guibg=#fffd00 gui=NONE
+hi Visual guifg=NONE guibg=#919309 gui=NONE
+hi CursorLine guifg=NONE guibg=#1b1b1b gui=NONE
+hi CursorColumn guifg=NONE guibg=#1b1b1b gui=NONE
+hi LineNr guifg=#868686 guibg=#141414 gui=NONE
+hi VertSplit guifg=#3f3f3f guibg=#3f3f3f gui=NONE
+hi MatchParen guifg=#cda869 guibg=NONE gui=NONE
+hi StatusLine guifg=#f8f8f8 guibg=#3f3f3f gui=bold
+hi StatusLineNC guifg=#f8f8f8 guibg=#3f3f3f gui=NONE
+hi Pmenu guifg=#9b703f guibg=NONE gui=NONE
+hi PmenuSel guifg=NONE guibg=#919309 gui=NONE
+hi IncSearch guifg=NONE guibg=#343a44 gui=NONE
+hi Search guifg=NONE guibg=#343a44 gui=NONE
+hi Directory guifg=#cf6a4c guibg=NONE gui=NONE
+hi Folded guifg=#5f5a60 guibg=#141414 gui=NONE
+
+hi Normal guifg=#f8f8f8 guibg=#141414 gui=NONE
+hi Boolean guifg=#cf6a4c guibg=NONE gui=NONE
+hi Character guifg=#cf6a4c guibg=NONE gui=NONE
+hi Comment guifg=#5f5a60 guibg=NONE gui=italic
+hi Conditional guifg=#cda869 guibg=NONE gui=NONE
+hi Constant guifg=#cf6a4c guibg=NONE gui=NONE
+hi Define guifg=#cda869 guibg=NONE gui=NONE
+hi ErrorMsg guifg=NONE guibg=NONE gui=NONE
+hi WarningMsg guifg=NONE guibg=NONE gui=NONE
+hi Float guifg=#cf6a4c guibg=NONE gui=NONE
+hi Function guifg=#9b703f guibg=NONE gui=NONE
+hi Identifier guifg=#f9ee98 guibg=NONE gui=NONE
+hi Keyword guifg=#cda869 guibg=NONE gui=NONE
+hi Label guifg=#8f9d6a guibg=NONE gui=NONE
+hi NonText guifg=#4f4f4f guibg=#1b1b1b gui=NONE
+hi Number guifg=#cf6a4c guibg=NONE gui=NONE
+hi Operator guifg=#cda869 guibg=NONE gui=NONE
+hi PreProc guifg=#cda869 guibg=NONE gui=NONE
+hi Special guifg=#f8f8f8 guibg=NONE gui=NONE
+hi SpecialKey guifg=#4f4f4f guibg=#1b1b1b gui=NONE
+hi Statement guifg=#cda869 guibg=NONE gui=NONE
+hi StorageClass guifg=#f9ee98 guibg=NONE gui=NONE
+hi String guifg=#8f9d6a guibg=NONE gui=NONE
+hi Tag guifg=#9b703f guibg=NONE gui=NONE
+hi Title guifg=#f8f8f8 guibg=NONE gui=bold
+hi Todo guifg=#5f5a60 guibg=NONE gui=inverse,bold,italic
+hi Type guifg=#9b703f guibg=NONE gui=NONE
+hi Underlined guifg=NONE guibg=NONE gui=underline
+hi rubyClass guifg=#cda869 guibg=NONE gui=NONE
+hi rubyFunction guifg=#9b703f guibg=NONE gui=NONE
+hi rubyInterpolationDelimiter guifg=NONE guibg=NONE gui=NONE
+hi rubySymbol guifg=#cf6a4c guibg=NONE gui=NONE
+hi rubyConstant guifg=#9b859d guibg=NONE gui=NONE
+hi rubyStringDelimiter guifg=#8f9d6a guibg=NONE gui=NONE
+hi rubyBlockParameter guifg=#7587a6 guibg=NONE gui=NONE
+hi rubyInstanceVariable guifg=#7587a6 guibg=NONE gui=NONE
+hi rubyInclude guifg=#cda869 guibg=NONE gui=NONE
+hi rubyGlobalVariable guifg=#7587a6 guibg=NONE gui=NONE
+hi rubyRegexp guifg=#e9c062 guibg=NONE gui=NONE
+hi rubyRegexpDelimiter guifg=#e9c062 guibg=NONE gui=NONE
+hi rubyEscape guifg=#cf6a4c guibg=NONE gui=NONE
+hi rubyControl guifg=#cda869 guibg=NONE gui=NONE
+hi rubyClassVariable guifg=#7587a6 guibg=NONE gui=NONE
+hi rubyOperator guifg=#cda869 guibg=NONE gui=NONE
+hi rubyException guifg=#cda869 guibg=NONE gui=NONE
+hi rubyPseudoVariable guifg=#7587a6 guibg=NONE gui=NONE
+hi rubyRailsUserClass guifg=#9b859d guibg=NONE gui=NONE
+hi rubyRailsARAssociationMethod guifg=#dad085 guibg=NONE gui=NONE
+hi rubyRailsARMethod guifg=#dad085 guibg=NONE gui=NONE
+hi rubyRailsRenderMethod guifg=#dad085 guibg=NONE gui=NONE
+hi rubyRailsMethod guifg=#dad085 guibg=NONE gui=NONE
+hi erubyDelimiter guifg=NONE guibg=NONE gui=NONE
+hi erubyComment guifg=#5f5a60 guibg=NONE gui=italic
+hi erubyRailsMethod guifg=#dad085 guibg=NONE gui=NONE
+hi htmlTag guifg=#ac885b guibg=NONE gui=NONE
+hi htmlEndTag guifg=#ac885b guibg=NONE gui=NONE
+hi htmlTagName guifg=#ac885b guibg=NONE gui=NONE
+hi htmlArg guifg=#ac885b guibg=NONE gui=NONE
+hi htmlSpecialChar guifg=#cf6a4c guibg=NONE gui=NONE
+hi javaScriptFunction guifg=#f9ee98 guibg=NONE gui=NONE
+hi javaScriptRailsFunction guifg=#dad085 guibg=NONE gui=NONE
+hi javaScriptBraces guifg=NONE guibg=NONE gui=NONE
+hi yamlKey guifg=#9b703f guibg=NONE gui=NONE
+hi yamlAnchor guifg=#7587a6 guibg=NONE gui=NONE
+hi yamlAlias guifg=#7587a6 guibg=NONE gui=NONE
+hi yamlDocumentHeader guifg=#8f9d6a guibg=NONE gui=NONE
+hi cssURL guifg=#7587a6 guibg=NONE gui=NONE
+hi cssFunctionName guifg=#dad085 guibg=NONE gui=NONE
+hi cssColor guifg=#cf6a4c guibg=NONE gui=NONE
+hi cssPseudoClassId guifg=#9b703f guibg=NONE gui=NONE
+hi cssClassName guifg=#9b703f guibg=NONE gui=NONE
+hi cssValueLength guifg=#cf6a4c guibg=NONE gui=NONE
+hi cssCommonAttr guifg=#cf6a4c guibg=NONE gui=NONE
+hi cssBraces guifg=NONE guibg=NONE gui=NONE
15 gvimrc
@@ -0,0 +1,15 @@
+color vwilight
+set guifont=Menlo\ Regular:h14
+set linespace=2
+set antialias
+
+" Don't beep
+set visualbell
+
+" Start without the toolbar
+set guioptions-=T
+
+if has("gui_macvim")
+ " Fullscreen takes up entire screen
+ set fuoptions=maxhorz,maxvert
+end
133 vimrc
@@ -0,0 +1,133 @@
+""
+"" Thanks:
+"" Gary Bernhardt <destroyallsoftware.com>
+"" Drew Neil <vimcasts.org>
+"" Tim Pope <tbaggery.com>
+"" Janus <github.com/carlhuda/janus>
+""
+
+set nocompatible
+syntax enable
+set encoding=utf-8
+
+call pathogen#infect()
+filetype plugin indent on
+
+color molokai
+set nonumber
+set ruler " show the cursor position all the time
+set cursorline
+set showcmd " display incomplete commands
+
+" Allow backgrounding buffers without writing them, and remember marks/undo
+" for backgrounded buffers
+set hidden
+
+"" Whitespace
+set nowrap " don't wrap lines
+set tabstop=2 " a tab is two spaces
+set shiftwidth=2 " an autoindent (with <<) is two spaces
+set expandtab " use spaces, not tabs
+set list " Show invisible characters
+set backspace=indent,eol,start " backspace through everything in insert mode
+" List chars
+set listchars="" " Reset the listchars
+set listchars=tab:\ \ " a tab should display as " ", trailing whitespace as "."
+set listchars+=trail:. " show trailing spaces as dots
+set listchars+=extends:> " The character to show in the last column when wrap is
+ " off and the line continues beyond the right of the screen
+set listchars+=precedes:< " The character to show in the last column when wrap is
+ " off and the line continues beyond the right of the screen
+"" Searching
+set hlsearch " highlight matches
+set incsearch " incremental searching
+set ignorecase " searches are case insensitive...
+set smartcase " ... unless they contain at least one capital letter
+
+function s:setupWrapping()
+ set wrap
+ set wrapmargin=2
+ set textwidth=72
+endfunction
+
+if has("autocmd")
+ " In Makefiles, use real tabs, not tabs expanded to spaces
+ au FileType make set noexpandtab
+
+ " Make sure all mardown files have the correct filetype set and setup wrapping
+ au BufRead,BufNewFile *.{md,markdown,mdown,mkd,mkdn,txt} setf markdown | call s:setupWrapping()
+
+ " Treat JSON files like JavaScript
+ au BufNewFile,BufRead *.json set ft=javascript
+
+ " make Python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ )
+ au FileType python set softtabstop=4 tabstop=4 shiftwidth=4 textwidth=79
+
+ " Remember last location in file, but not for commit messages.
+ " see :help last-position-jump
+ au BufReadPost * if &filetype !~ '^git\c' && line("'\"") > 0 && line("'\"") <= line("$")
+ \| exe "normal! g`\"" | endif
+endif
+
+" provide some context when editing
+set scrolloff=3
+
+" don't use Ex mode, use Q for formatting
+map Q gq
+
+" clear the search buffer when hitting return
+:nnoremap <CR> :nohlsearch<cr>
+
+" Insert the current directory into a command
+cmap <C-P> <C-R>=expand("%:p:h") . "/"
+
+let mapleader=","
+
+map <leader>gv :CommandTFlush<cr>\|:CommandT app/views<cr>
+map <leader>gc :CommandTFlush<cr>\|:CommandT app/controllers<cr>
+map <leader>gm :CommandTFlush<cr>\|:CommandT app/models<cr>
+map <leader>gh :CommandTFlush<cr>\|:CommandT app/helpers<cr>
+map <leader>gl :CommandTFlush<cr>\|:CommandT lib<cr>
+map <leader>gf :CommandTFlush<cr>\|:CommandT features<cr>
+map <leader>gg :topleft 100 :split Gemfile<cr>
+map <leader>f :CommandTFlush<cr>\|:CommandT<cr>
+" http://vimcasts.org/e/14
+cnoremap %% <C-R>=expand('%:h').'/'<cr>
+map <leader>F :CommandTFlush<cr>\|:CommandT %%<cr>
+
+nnoremap <leader><leader> <c-^>
+
+" find merge conflict markers
+nmap <silent> <leader>cf <ESC>/\v^[<=>]{7}( .*\|$)<CR>
+
+command! KillWhitespace :normal :%s/ *$//g<cr><c-o><cr>
+
+nnoremap <c-j> <c-w>j
+nnoremap <c-k> <c-w>k
+nnoremap <c-h> <c-w>h
+nnoremap <c-l> <c-w>l
+
+" disable cursor keys in normal mode
+map <Left> :echo "no!"<cr>
+map <Right> :echo "no!"<cr>
+map <Up> :echo "no!"<cr>
+map <Down> :echo "no!"<cr>
+
+set backupdir=~/.vim/_backup " where to put backup files.
+set directory=~/.vim/_temp " where to put swap files.
+
+if has("statusline") && !&cp
+ set laststatus=2 " always show the status bar
+
+ " Start the status line
+ set statusline=%f\ %m\ %r
+
+ " Add fugitive
+ set statusline+=%{fugitive#statusline()}
+
+ " Finish the statusline
+ set statusline+=Line:%l/%L[%p%%]
+ set statusline+=Col:%v
+ set statusline+=Buf:#%n
+ set statusline+=[%b][0x%B]
+endif
Please sign in to comment.
Something went wrong with that request. Please try again.