26dcdc89026f

vim: tweaks
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 03 Mar 2011 16:20:19 -0500
parents d4d26f2b7941
children bb95653c7141
branches/tags (none)
files vim/.vimrc vim/colors/molokai.vim

Changes

--- a/vim/.vimrc	Thu Mar 03 09:28:33 2011 -0500
+++ b/vim/.vimrc	Thu Mar 03 16:20:19 2011 -0500
@@ -109,8 +109,7 @@
 map <leader><space> :noh<cr>
 
 runtime macros/matchit.vim
-nmap <tab> %
-vmap <tab> %
+map <tab> %
 
 nnoremap Y y$
 nnoremap D d$
@@ -196,13 +195,17 @@
 " Various filetype-specific stuff --------------------------------------------- {{{
 
 " Cram {{{
+
 au BufNewFile,BufRead *.t set filetype=cram
 let cram_fold=1
 autocmd Syntax cram setlocal foldlevel=1
+
 " }}}
 " Clojure {{{
+
 au BufNewFile,BufRead *.clj nmap <localleader>ee 0;\et
 au FileType clojure call TurnOnClojureFolding()
+
 " }}}
 " C {{{
 
@@ -210,6 +213,7 @@
 
 " }}}
 " HTML and HTMLDjango {{{
+
 au BufNewFile,BufRead *.html setlocal filetype=htmldjango
 au BufNewFile,BufRead *.html setlocal foldmethod=manual
 au BufNewFile,BufRead *.html nnoremap <buffer> <localleader>f Vatzf
@@ -217,57 +221,78 @@
 au BufNewFile,BufRead *.html imap <buffer> <d-e><cr> <d-e><s-cr>
 au BufNewFile,BufRead *.html imap <buffer> <d-e><space> <d-e>.<bs>
 au BufNewFile,BufRead *.html nnoremap <s-cr> vit<esc>a<cr><esc>vito<esc>i<cr><esc>
+
 " }}}
 " CSS {{{
+
 au BufNewFile,BufRead *.css setlocal foldmethod=marker
 au BufNewFile,BufRead *.css setlocal foldmarker={,}
 au BufNewFile,BufRead *.css nnoremap <buffer> cc ddko
-au BufNewFile,BufRead *.css nnoremap <buffer> <localleader>S ?{<CR>jV/^\s*\}?$<CR>k:sort<CR>:noh<CR>
+au BufNewFile,BufRead *.css nnoremap <buffer> <localleader>S ?{<CR>jV/\v^\s*\}?$<CR>k:sort<CR>:noh<CR>
 au BufNewFile,BufRead *.css inoremap <buffer> {<cr> {}<left><cr>.<cr><esc>kA<bs><space><space><space><space>
+
 " }}}
 " LessCSS {{{
+
 au BufNewFile,BufRead *.less setlocal filetype=less
 au BufNewFile,BufRead *.less setlocal foldmethod=marker
 au BufNewFile,BufRead *.less setlocal foldmarker={,}
 au BufNewFile,BufRead *.less nnoremap <buffer> cc ddko
-au BufNewFile,BufRead *.less nnoremap <buffer> <localleader>S ?{<CR>jV/^\s*\}?$<CR>k:sort<CR>:noh<CR>
+au BufNewFile,BufRead *.less nnoremap <buffer> <localleader>S ?{<CR>jV/\v^\s*\}?$<CR>k:sort<CR>:noh<CR>
 au BufNewFile,BufRead *.less inoremap <buffer> {<cr> {}<left><cr>.<cr><esc>kA<bs><space><space><space><space>
+
 " }}}
 " Javascript {{{
+
 au BufNewFile,BufRead *.js setlocal foldmethod=marker
 au BufNewFile,BufRead *.js setlocal foldmarker={,}
+
 " }}}
 " Confluence {{{
+
 au BufRead,BufNewFile *.confluencewiki setlocal filetype=confluencewiki
 au BufRead,BufNewFile *.confluencewiki setlocal wrap linebreak nolist
+
 " }}}
 " Fish {{{
+
 au BufNewFile,BufRead *.fish setlocal filetype=fish
+
 " }}}
 " Markdown {{{
+
 au BufNewFile,BufRead *.m*down setlocal filetype=markdown
 au Filetype markdown nnoremap <buffer> <localleader>1 yypVr=
 au Filetype markdown nnoremap <buffer> <localleader>2 yypVr-
 au Filetype markdown nnoremap <buffer> <localleader>3 I### <ESC>
+
 " }}}
 " Vim {{{
+
 au FileType vim setlocal foldmethod=marker
+
 " }}}
 " Python {{{
+
 au Filetype python noremap  <localleader>rr :RopeRename<CR>
 au Filetype python vnoremap <localleader>rm :RopeExtractMethod<CR>
 au Filetype python noremap  <localleader>ri :RopeOrganizeImports<CR>
+
 " }}}
 " Django {{{
+
 au BufNewFile,BufRead urls.py      setlocal nowrap
 au BufNewFile,BufRead urls.py      normal! zR
 au BufNewFile,BufRead settings.py  normal! zR
 au BufNewFile,BufRead dashboard.py normal! zR
+
 " }}}
 " Nginx {{{
+
 au BufRead,BufNewFile /etc/nginx/conf/* set ft=nginx
 au BufRead,BufNewFile /etc/nginx/sites-available/* set ft=nginx
 au BufRead,BufNewFile /usr/local/etc/nginx/sites-available/* set ft=nginx
+
 " }}}
 
 " }}}
--- a/vim/colors/molokai.vim	Thu Mar 03 09:28:33 2011 -0500
+++ b/vim/colors/molokai.vim	Thu Mar 03 16:20:19 2011 -0500
@@ -13,41 +13,50 @@
 set background=dark
 let g:colors_name="molokai"
 
+" Basic Layout {{{
 hi Normal          guifg=#F8F8F2 guibg=#1B1E1F
 hi Folded          guifg=#666666 guibg=bg
-hi Comment         guifg=#5c7176
 hi CursorLine                    guibg=#232728
 hi CursorColumn                  guibg=#232728
 hi ColorColumn                   guibg=#232728
 hi LineNr          guifg=#AAAAAA guibg=bg
 hi FoldColumn      guifg=#AAAAAA guibg=bg
-
+hi VertSplit       guifg=#AAAAAA guibg=bg gui=none
+hi Search          guifg=#000000 guibg=#E4E500
+hi IncSearch       guibg=#000000 guifg=#FF8D00
+" }}}
+" Syntax {{{
 hi Boolean         guifg=#AE81FF
+hi Comment         guifg=#5c7176
 hi Character       guifg=#E6DB74
 hi Number          guifg=#AE81FF
 hi String          guifg=#E6DB74
 hi Conditional     guifg=#F92672               gui=bold
 hi Constant        guifg=#AE81FF               gui=bold
-hi Cursor          guifg=#000000 guibg=#F35FBC
-hi iCursor         guifg=#000000 guibg=#FDFF00
-hi vCursor         guifg=#000000 guibg=#AAF412
 hi Debug           guifg=#BCA3A3               gui=bold
 hi Define          guifg=#66D9EF
 hi Delimiter       guifg=#8F8F8F
+hi Float           guifg=#AE81FF
+hi Function        guifg=#A6E22E
+hi Identifier      guifg=#FD971F
+" }}}
+" Diffs {{{
 hi DiffAdd                       guibg=#0F1D0B
 hi DiffChange      guifg=#89807D guibg=#322F2D
 hi DiffDelete      guifg=#960050 guibg=#1E0010
 hi DiffText                      guibg=#4A4340 gui=italic,bold
+" }}}
+" Cursor {{{
+hi Cursor          guifg=#000000 guibg=#F35FBC
+hi iCursor         guifg=#000000 guibg=#FDFF00
+hi vCursor         guifg=#000000 guibg=#AAF412
+" }}}
 
 hi Directory       guifg=#A6E22E               gui=bold
 hi Error           guifg=#960050 guibg=#1E0010
 hi ErrorMsg        guifg=#F92672 guibg=#232526 gui=bold
 hi Exception       guifg=#A6E22E               gui=bold
-hi Float           guifg=#AE81FF
-hi Function        guifg=#A6E22E
-hi Identifier      guifg=#FD971F
 hi Ignore          guifg=#808080 guibg=bg
-hi IncSearch       guibg=#000000 guifg=#FF8D00
 
 hi Keyword         guifg=#F92672               gui=bold
 hi Label           guifg=#E6DB74               gui=none
@@ -59,17 +68,17 @@
 hi MoreMsg         guifg=#E6DB74
 hi Operator        guifg=#F92672
 
-" complete menu
+" Completion Menu {{{
 hi Pmenu           guifg=#cccccc guibg=#232728
 hi PmenuSel        guifg=#000000 guibg=#AAF412
 hi PmenuSbar                     guibg=#131414
 hi PmenuThumb      guifg=#777777
+" }}}
 
 hi PreCondit       guifg=#A6E22E               gui=bold
 hi PreProc         guifg=#A6E22E
 hi Question        guifg=#66D9EF
 hi Repeat          guifg=#F92672               gui=bold
-hi Search          guifg=#000000 guibg=#E4E500
 
 " marks column
 hi SignColumn      guifg=#A6E22E guibg=#151617
@@ -77,12 +86,6 @@
 hi SpecialComment  guifg=#465457               gui=bold
 hi Special         guifg=#66D9EF guibg=bg      gui=italic
 hi SpecialKey      guifg=#888A85               gui=italic
-if has("spell")
-    hi SpellBad    guisp=#FF0000 gui=undercurl
-    hi SpellCap    guisp=#7070F0 gui=undercurl
-    hi SpellLocal  guisp=#70F0F0 gui=undercurl
-    hi SpellRare   guisp=#FFFFFF gui=undercurl
-endif
 hi Statement       guifg=#F92672               gui=bold
 hi StatusLine      guifg=#CD5907 guibg=fg
 hi StatusLineNC    guifg=#808080 guibg=#080808
@@ -96,22 +99,29 @@
 hi Type            guifg=#66D9EF               gui=none
 hi Underlined      guifg=#808080               gui=underline
 
-hi VertSplit       guifg=#AAAAAA guibg=bg gui=none
-hi VisualNOS                     guibg=#403D3D
-hi Visual                        guibg=#403D3D
 hi WarningMsg      guifg=#FFFFFF guibg=#333333 gui=bold
 hi WildMenu        guifg=#66D9EF guibg=#000000
 
 hi MyTagListFileName guifg=#F92672 guibg=bg gui=bold
 
-
-" Invisible character colors
+" Spelling {{{
+if has("spell")
+    hi SpellBad    guisp=#FF0000 gui=undercurl
+    hi SpellCap    guisp=#7070F0 gui=undercurl
+    hi SpellLocal  guisp=#70F0F0 gui=undercurl
+    hi SpellRare   guisp=#FFFFFF gui=undercurl
+endif
+" }}}
+" Visual Mode {{{
+hi VisualNOS  guibg=#403D3D
+hi Visual     guibg=#403D3D
+" }}}
+" Invisible character colors {{{
 highlight NonText    guifg=#444444 guibg=bg
 highlight SpecialKey guifg=#444444 guibg=bg
+" }}}
 
-"
-" Support for 256-color terminal
-"
+" Support for 256-color terminals {{{
 if &t_Co > 255
    hi Boolean         ctermfg=135
    hi Character       ctermfg=144
@@ -196,4 +206,4 @@
    hi ColorColumn                 ctermbg=234
    hi LineNr          ctermfg=250 ctermbg=233
    hi NonText         ctermfg=240 ctermbg=233
-end
+end " }}}