Commits

leaf corcoran  committed 7133060

vimrc

  • Participants

Comments (0)

Files changed (1)

+syntax on
+set nocompatible
+" call pathogen#infect()
+
+filetype off
+
+set rtp+=~/.vim/bundle/vundle/
+call vundle#rc()
+
+Bundle 'gmarik/vundle'
+
+Bundle 'kchmck/vim-coffee-script'
+Bundle 'scrooloose/nerdtree'
+
+Bundle 'molokai'
+Bundle 'ZenCoding.vim'
+Bundle 'L9'
+Bundle 'FuzzyFinder'
+" Bundle 'AutoComplPop'
+Bundle 'Shougo/neocomplcache'
+" Bundle 'Diablo3'
+Bundle 'fontsize'
+Bundle 'snipMate'
+
+Bundle 'moonscript-vim'
+" Bundle 'opa'
+
+" Bundle 'ctrlp.vim'
+" Bundle 'git://git.wincent.com/command-t.git'
+
+filetype plugin indent on
+
+let g:neocomplcache_enable_at_startup = 1
+let g:neocomplcache_enable_smart_case = 1
+let g:neocomplcache_enable_underbar_completion = 1
+
+let g:neocomplcache_lock_buffer_name_pattern = '\[fuf\]'
+
+if has('gui_running')
+	set lines=50
+	set columns=100
+	" colors wombat
+	colors molokai
+	" colors Diablo3
+	" set gfn=Consolas:h14:a
+	" set guifont=Consolas\ 11
+	" set guifont=Droid\ Sans\ Mono\ 15
+	set guifont=Terminus\ 14
+	set guioptions-=T "hide toolbar
+	set go-=m " hide the menu
+	set go-=L " hide scroll bars
+	set go-=r
+	set go-=e
+	" use vim tab bar instead of gtk one
+	set showtabline=1
+else
+	colors elflord
+	set ttymouse=xterm2
+	set mouse=a
+end
+
+set ai " auto indent
+set nu " line numbers
+set ts=4 " tab size
+set shiftwidth=4 " tab size in auto indent
+set binary noeol " don't put cr at end of file
+" set showmatch " show matching braces
+set backspace=indent,eol,start
+set novb " don't use visual bell
+set cmdheight=1 " send height of command bar to 1
+set laststatus=2
+set wildmenu
+set hlsearch " highlight search
+set incsearch " incremental search
+set cot+=longest " autocomplete to longest unambiguous string
+set gdefault " global replace by default
+
+set noswapfile
+
+set ignorecase
+set smartcase " ignore case only when everything is lowercase, cool
+
+command W w " big W writes like little w
+command Blame !urxvt -e git blame %
+
+map <f1> :noh<cr>
+
+" map <S-f2> :Explore %:p:h<cr>
+" map <f2> :tabe %<cr>:Explore %:p:h<cr>
+
+map <S-f2> :NERDTree %:p:h<cr>
+map <f2> :tabe %<cr>:NERDTree%:p:h<cr>
+
+map <f9> :q<cr>
+noremap <f12> <esc>:syntax sync fromstart<cr>
+inoremap <f12> <c-o>:syntax sync fromstart<cr>
+
+map <c-t> :tabe<cr><c-f>
+map <c-left> gT
+map <c-right> gt
+
+" tab switching & moving
+map <A-1> :tabn 1<cr>
+map <A-!> :tabm 0<cr>
+
+map <A-2> :tabn 2<cr>
+map <A-@> :tabm 1<cr>
+
+map <A-3> :tabn 3<cr>
+map <A-#> :tabm 2<cr>
+
+map <A-4> :tabn 4<cr>
+map <A-$> :tabm 3<cr>
+
+map <A-5> :tabn 5<cr>
+map <A-%> :tabm 4<cr>
+
+au BufNewFile,BufRead *.as set filetype=as
+
+au BufNewFile,BufRead *.css set filetype=scss
+
+au BufNewFile,BufRead *.frag,*.vert,*.fp,*.vp,*.glsl setf glsl
+
+au BufNewFile,BufRead *.flex,*.jflex set filetype=jflex
+au BufRead,BufNewFile *.cup set filetype=cup
+au BufNewFile,BufRead *.lsl set filetype=lsl
+au BufNewFile,BufRead *.less set filetype=less
+
+au BufNewFile,BufRead *.leaf set filetype=leaf
+
+" au BufNewFile,BufRead *.fs set iskeyword& |
+			"\ set filetype=glsl
+" au BufNewFile,BufRead *.vs set filetype=glsl
+
+au BufNewFile,BufRead *.rockspec set filetype=lua
+
+au BufNewFile,BufRead *.md set filetype=markdown
+
+au BufNewFile,BufRead *.sl set filetype=sl
+
+au BufNewFile,BufRead *.hx set filetype=haxe
+
+au BufNewFile,BufRead Tupfile set filetype=tup
+
+au BufNewFile,BufRead *.rl set filetype=ragel
+
+" use spaces for haskell files
+au BufNewFile,BufRead *.hs
+	\ set expandtab
+
+" enable html in lua substring
+au BufNewFile,BufRead *.lua
+	\ unlet b:current_syntax |
+	\ syn include @luaHtml syntax/html.vim |
+	\ syn region htmlString start=+\[==\[+ end=+]==]+ keepend contains=@luaHtml
+
+
+" glsl in coffee script
+au BufNewFile,BufRead *.coffee
+	\ unlet b:current_syntax |
+	\ syn include @coffeGLSL syntax/glsl.vim |
+	\ syn region glslString matchgroup=langDelim start=+'''//glsl+ end=+'''+ keepend contains=@coffeGLSL |
+	\ hi Plain guifg=White |
+	\ hi link glslString Plain |
+	\ hi link langDelim PreCondit
+
+au BufNewFile,BufReadPost *.coffee setl shiftwidth=2 expandtab
+
+" don't let ctrl space mess stuff up
+imap <Nul> <Space>
+
+imap <c-u> <esc>
+
+" rockets and stuff
+imap <C-j> ->
+imap <C-k> =>
+imap <C-l> []
+imap <C-g> () {<cr>}<cr><esc>3k<S-a><left>
+
+" switch from tabs to spaces
+map <f11> :setlocal shiftwidth=4 tabstop=4 softtabstop=4 et<cr>
+map <c-f11> :setlocal shiftwidth=2 tabstop=2 softtabstop=2 et<cr>
+map <f10> <c-f11>
+
+" java stuff
+au BufNewFile,BufRead *.java
+	\ map <f3> :JavaImportMissing<cr>|
+	\ imap <buffer> <c-k> System.out.println("
+
+au FileType javascript imap <buffer> <c-k> console.log("
+au FileType python imap <buffer> <c-k> self
+
+au FileType ruby setlocal shiftwidth=2 tabstop=2 softtabstop=2 et
+au FileType html setlocal shiftwidth=2 tabstop=2 softtabstop=2 et
+au FileType treetop setlocal shiftwidth=2 tabstop=2 softtabstop=2 et
+au FileType moon setlocal shiftwidth=2 tabstop=2 softtabstop=2 et
+au FileType javascript setlocal shiftwidth=2 tabstop=2 softtabstop=2 et
+
+au FileType scss setlocal shiftwidth=4 tabstop=4 softtabstop=4 et
+
+au FileType python setlocal shiftwidth=4 tabstop=4 softtabstop=4 et |
+	\ setlocal list listchars=tab:▷⋅,trail:⋅,nbsp:⋅
+
+au BufNewFile,BufRead *.erb
+	\ imap <buffer> <c-l> <%=  %><esc>2hi
+
+let html_use_css = 1
+
+" ctrl-f in insert mode toggles _ for spaces written
+let g:spaceToUnderscore = 0
+function! ToggleSpaceToUnderscore()
+	if g:spaceToUnderscore == 0 | imap <space> _| endif
+	if g:spaceToUnderscore == 1 | iunmap <space>| endif
+	let g:spaceToUnderscore = (g:spaceToUnderscore+1) % 2
+endf
+imap <c-f> <c-o>:call ToggleSpaceToUnderscore()<cr>
+
+map <space> <c-w>w
+map <c-f> :FufCoverageFile!<cr>
+map <c-e> :FufBuffer<cr>
+
+map <c-space> gt
+map <s-space> gT
+
+let g:fuf_coveragefile_exclude = '\v\~$|\.(o|exe|dll|bak|orig|swp|pyc|pyo|class|png|gif)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])'
+let g:fuf_file_exclude = '\v\~$|\.(o|exe|dll|bak|orig|swp|pyc|pyo|class|png|gif)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])'
+
+let NERDTreeIgnore=['\.o$', '\~$', '\.pyc$', '\.class$', '\.beam$']
+
+" autocmd InsertEnter * syn clear EOLWS | syn match EOLWS excludenl /\s\+\%#\@!$/
+" autocmd InsertLeave * syn clear EOLWS | syn match EOLWS excludenl /\s\+$/
+" highlight EOLWS ctermbg=red guibg=red
+
+" strips whitespace from end of lines
+nmap <leader>w :%s/\s\+$//<CR>:let @/=''<CR>
+nmap <leader>f :noh<cr>
+nmap <leader>s :w<cr>
+nmap <leader>q :q<cr>
+map <c-s> :w<cr>
+
+autocmd FileType python set ft=python.django
+autocmd FileType html set ft=htmldjango.html
+
+
+
+
+set modeline