--- a/vim/.vimrc Tue May 31 18:47:34 2011 -0400
+++ b/vim/.vimrc Tue Jun 14 22:27:55 2011 -0400
@@ -49,6 +49,9 @@
" Save when losing focus
au FocusLost * :wa
+" Resize splits when the window is resized
+au VimResized * exe "normal! \<c-w>="
+
" Tabs, spaces, wrapping {{{
set tabstop=4
@@ -233,12 +236,9 @@
" }}}
" Various filetype-specific stuff --------------------------------------------- {{{
-" Cram {{{
+" C {{{
-au BufNewFile,BufRead *.t set filetype=cram
-
-let cram_fold=1
-autocmd Syntax cram setlocal foldlevel=1
+au FileType c setlocal foldmethod=syntax
" }}}
" Clojure {{{
@@ -249,47 +249,20 @@
au FileType clojure nmap <localleader>ee 0;\et
" }}}
-" C {{{
+" Confluence {{{
-au FileType c setlocal foldmethod=syntax
+au BufRead,BufNewFile *.confluencewiki setlocal filetype=confluencewiki
+
+" Wiki pages should be soft-wrapped.
+au FileType confluencewiki setlocal wrap linebreak nolist
" }}}
-" HTML and HTMLDjango {{{
-
-au BufNewFile,BufRead *.html setlocal filetype=htmldjango
-au BufNewFile,BufRead *.html setlocal foldmethod=manual
-
-" Use <localleader>f to fold the current tag.
-au BufNewFile,BufRead *.html nnoremap <buffer> <localleader>f Vatzf
-au BufNewFile,BufRead *.html nnoremap <buffer> VV vatV
+" Cram {{{
-" Use Shift-Return to turn this:
-" <tag>|</tag>
-"
-" into this:
-" <tag>
-" |
-" </tag>
-au BufNewFile,BufRead *.html inoremap <buffer> <s-cr> <cr><esc>kA<cr>
-au BufNewFile,BufRead *.html nnoremap <buffer> <s-cr> vit<esc>a<cr><esc>vito<esc>i<cr><esc>
+au BufNewFile,BufRead *.t set filetype=cram
-" Sparkup mappings:
-"
-" <c-e><space> to expand sparkup normally:
-" <p>|</p>
-"
-" <c-e><return> to force an expanded sparkup.
-" <p>
-" |
-" </p>
-au BufNewFile,BufRead *.html imap <buffer> <c-s><cr> <c-s><s-cr>
-au BufNewFile,BufRead *.html imap <buffer> <c-s><space> <c-s>.<bs>
-
-" Django tags
-au FileType jinja,htmldjango inoremap <buffer> <c-t> {%<space><space>%}<left><left><left>
-
-" Django variables
-au FileType jinja,htmldjango inoremap <buffer> <c-f> {{<space><space>}}<left><left><left>
+let cram_fold=1
+autocmd Syntax cram setlocal foldlevel=1
" }}}
" CSS and LessCSS {{{
@@ -335,49 +308,6 @@
au BufNewFile,BufRead *.less inoremap <buffer> {<cr> {}<left><cr>.<cr><esc>kA<bs><space><space><space><space>
" }}}
-" Javascript {{{
-
-au FileType javascript setlocal foldmethod=marker
-au FileType javascript setlocal foldmarker={,}
-
-" }}}
-" Confluence {{{
-
-au BufRead,BufNewFile *.confluencewiki setlocal filetype=confluencewiki
-
-" Wiki pages should be soft-wrapped.
-au FileType confluencewiki setlocal wrap linebreak nolist
-
-" }}}
-" Fish {{{
-
-au BufNewFile,BufRead *.fish setlocal filetype=fish
-
-" }}}
-" Markdown {{{
-
-au BufNewFile,BufRead *.m*down setlocal filetype=markdown
-
-" Use <localleader>1/2/3 to add headings.
-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
-au FileType help setlocal textwidth=78
-
-" }}}
-" 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>
-au FileType python setlocal omnifunc=pythoncomplete#Complete
-
-" }}}
" Django {{{
au BufNewFile,BufRead urls.py setlocal nowrap
@@ -391,6 +321,77 @@
au BufNewFile,BufRead settings.py setlocal filetype=python.django
au BufNewFile,BufRead settings.py setlocal foldmethod=marker
au BufNewFile,BufRead forms.py setlocal filetype=python.django
+au BufNewFile,BufRead common_settings.py setlocal filetype=python.django
+au BufNewFile,BufRead common_settings.py setlocal foldmethod=marker
+
+" }}}
+" Firefox {{{
+
+au BufRead,BufNewFile ~/Library/Caches/* setlocal buftype=nofile
+
+" }}}
+" Fish {{{
+
+au BufNewFile,BufRead *.fish setlocal filetype=fish
+
+" }}}
+" HTML and HTMLDjango {{{
+
+au BufNewFile,BufRead *.html setlocal filetype=htmldjango
+au BufNewFile,BufRead *.html setlocal foldmethod=manual
+
+" Use <localleader>f to fold the current tag.
+au BufNewFile,BufRead *.html nnoremap <buffer> <localleader>f Vatzf
+au BufNewFile,BufRead *.html nnoremap <buffer> VV vatV
+
+" Use Shift-Return to turn this:
+" <tag>|</tag>
+"
+" into this:
+" <tag>
+" |
+" </tag>
+au BufNewFile,BufRead *.html inoremap <buffer> <s-cr> <cr><esc>kA<cr>
+au BufNewFile,BufRead *.html nnoremap <buffer> <s-cr> vit<esc>a<cr><esc>vito<esc>i<cr><esc>
+
+" Sparkup mappings:
+"
+" <c-e><space> to expand sparkup normally:
+" <p>|</p>
+"
+" <c-e><return> to force an expanded sparkup.
+" <p>
+" |
+" </p>
+au BufNewFile,BufRead *.html imap <buffer> <c-s><cr> <c-s><s-cr>
+au BufNewFile,BufRead *.html imap <buffer> <c-s><space> <c-s>.<bs>
+
+" Django tags
+au FileType jinja,htmldjango inoremap <buffer> <c-t> {%<space><space>%}<left><left><left>
+
+" Django variables
+au FileType jinja,htmldjango inoremap <buffer> <c-f> {{<space><space>}}<left><left><left>
+
+" }}}
+" Javascript {{{
+
+au FileType javascript setlocal foldmethod=marker
+au FileType javascript setlocal foldmarker={,}
+
+" }}}
+" Lisp {{{
+
+au FileType lisp call TurnOnLispFolding()
+
+" }}}
+" Markdown {{{
+
+au BufNewFile,BufRead *.m*down setlocal filetype=markdown
+
+" Use <localleader>1/2/3 to add headings.
+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>
" }}}
" Nginx {{{
@@ -405,20 +406,18 @@
au BufNewFile,BufRead .pentadactylrc set filetype=pentadactyl
" }}}
-" Vagrant {{{
-
-au BufRead,BufNewFile Vagrantfile set ft=ruby
-
-" }}}
" Puppet {{{
au Filetype puppet setlocal foldmethod=marker
au Filetype puppet setlocal foldmarker={,}
" }}}
-" Firefox {{{
+" Python {{{
-au BufRead,BufNewFile ~/Library/Caches/* setlocal buftype=nofile
+au Filetype python noremap <localleader>rr :RopeRename<CR>
+au Filetype python vnoremap <localleader>rm :RopeExtractMethod<CR>
+au Filetype python noremap <localleader>ri :RopeOrganizeImports<CR>
+au FileType python setlocal omnifunc=pythoncomplete#Complete
" }}}
" ReStructuredText {{{
@@ -429,6 +428,24 @@
au Filetype rst nnoremap <buffer> <localleader>4 yypVr`
" }}}
+" Vagrant {{{
+
+au BufRead,BufNewFile Vagrantfile set ft=ruby
+
+" }}}
+" Vim {{{
+
+au FileType vim setlocal foldmethod=marker
+au FileType help setlocal textwidth=78
+
+" }}}
+
+" }}}
+" Quick editing --------------------------------------------------------------- {{{
+
+nnoremap <leader>ev <C-w>s<C-w>j<C-w>L:e $MYVIMRC<cr>
+nnoremap <leader>es <C-w>s<C-w>j<C-w>L:e ~/.vim/snippets/<cr>
+nnoremap <leader>eo <C-w>s<C-w>j<C-w>L:e ~/Dropbox/Org<cr>4j
" }}}
" Convenience mappings -------------------------------------------------------- {{{
@@ -472,10 +489,6 @@
" Rainbows!
nmap <leader>R :RainbowParenthesesToggle<CR>
-" Edit vim stuff
-nnoremap <leader>ev <C-w>s<C-w>j<C-w>L:e $MYVIMRC<cr>
-nnoremap <leader>es <C-w>s<C-w>j<C-w>L:e ~/.vim/snippets/<cr>
-
" Sudo to write
cmap w!! w !sudo tee % >/dev/null
@@ -610,9 +623,9 @@
" }}}
" OrgMode {{{
-let g:org_plugins = ['ShowHide', '|', 'Navigator', 'EditStructure', '|', 'Todo', 'Misc']
+let g:org_plugins = ['ShowHide', '|', 'Navigator', 'EditStructure', '|', 'Todo', 'Date', 'Misc']
-let g:org_todo_keywords = ['TODO', 'HOLD', '|', 'DONE']
+let g:org_todo_keywords = ['TODO', '|', 'DONE']
let g:org_debug = 1
" }}}
" DirDiff {{{
@@ -621,6 +634,49 @@
map <unique> <Leader>Dj <Plug>DirDiffNext
map <unique> <Leader>Dk <Plug>DirDiffPrev
" }}}
+" SLIMV {{{
+
+" First check if SWANK is bundled with Slimv
+let swanks = split( globpath( &runtimepath, 'slime/start-swank.lisp'), '\n' )
+
+if len( swanks ) == 0
+ " Try to find SWANK in the standard SLIME installation locations
+ if g:slimv_windows || g:slimv_cygwin
+ let swanks = split( globpath( 'c:/slime/,c:/*lisp*/slime/,c:/*lisp*/site/lisp/slime/,c:/Program Files/*lisp*/site/lisp/slime/', 'start-swank.lisp' ), '\n' )
+ else
+ let swanks = split( globpath( '/usr/share/common-lisp/source/slime/', 'start-swank.lisp' ), '\n' )
+ endif
+endif
+
+if len( swanks ) != 0
+ let g:slimv_swank_cmd = '! dtach -n /tmp/swank.socket sbcl --load "' . swanks[0] . '"'
+ let g:slimv_swank_cmd = '! dtach -n /tmp/swank.socket clisp -i "' . swanks[0] . '"'
+endif
+
+
+" }}}}
+" Threesome {{{
+
+let g:threesome_initial_mode = "grid"
+
+let g:threesome_initial_layout_grid = 0
+let g:threesome_initial_layout_loupe = 0
+let g:threesome_initial_layout_compare = 0
+let g:threesome_initial_layout_path = 0
+
+let g:threesome_initial_diff_grid = 0
+let g:threesome_initial_diff_loupe = 0
+let g:threesome_initial_diff_compare = 0
+let g:threesome_initial_diff_path = 0
+
+let g:threesome_initial_scrollbind_grid = 0
+let g:threesome_initial_scrollbind_loupe = 0
+let g:threesome_initial_scrollbind_compare = 0
+let g:threesome_initial_scrollbind_path = 0
+
+let g:threesome_wrap = "nowrap"
+
+" }}}
" }}}
" Synstack -------------------------------------------------------------------- {{{