af9026179cd3

A bunch of vim crap
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 25 Mar 2016 21:41:27 +0000
parents 3f32804eab4f
children 8ce6e1e14b22
branches/tags (none)
files .hgsubstate vim/bundle/ccs/syntax/ccs.vim vim/vimrc

Changes

--- a/.hgsubstate	Fri Mar 25 21:39:04 2016 +0000
+++ b/.hgsubstate	Fri Mar 25 21:41:27 2016 +0000
@@ -8,7 +8,7 @@
 54deda1ad27d7def8fbfebc03ae583f4b0752dd9 vim/bundle/asmx86
 2bcc153228d77451a22b2cf8cfbb432bae92cc12 vim/bundle/badwolf
 5d747e72d1f2e9bdd1d3f3a1375faabf5fe00313 vim/bundle/bencode
-2ed29341d197aa8e49568b579c02b1ce6f76a34a vim/bundle/clam
+bd953da766180c9197e0abad7eae716d9dea56e8 vim/bundle/clam
 f1c53e290b16885c2eb3fc96e57d9984b627f735 vim/bundle/clojure-static
 dc349bb7d30f713d770fc1fa0fe209e6aab82dc8 vim/bundle/commentary
 c1646e3c28d75bcc834af4836f4c6e12296ba891 vim/bundle/ctrlp
--- a/vim/bundle/ccs/syntax/ccs.vim	Fri Mar 25 21:39:04 2016 +0000
+++ b/vim/bundle/ccs/syntax/ccs.vim	Fri Mar 25 21:41:27 2016 +0000
@@ -3,7 +3,7 @@
 endif
 
 syntax region ccsComment start=+*+ end=+$+
-syntax keyword ccsKeyword proc agent prop set checkprop
+syntax keyword ccsKeyword proc agent prop set checkprop echo
 syntax keyword ccsKeyword min max tau eps
 syntax keyword ccsConstant nil
 syntax match ccsOperator '\v\.'
@@ -14,7 +14,10 @@
 " with very magic, whatever idc
 syntax match ccsInput '\<[a-z]\k\+'
 
+syntax region ccsString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=@Spell
+
 highlight default link ccsComment Comment
+highlight default link ccsString String
 highlight default link ccsConstant Constant
 highlight default link ccsKeyword Keyword
 highlight default link ccsOperator Operator
--- a/vim/vimrc	Fri Mar 25 21:39:04 2016 +0000
+++ b/vim/vimrc	Fri Mar 25 21:41:27 2016 +0000
@@ -222,12 +222,13 @@
 set background=dark
 let g:badwolf_tabline = 2
 let g:badwolf_html_link_underline = 0
-colorscheme badwolf
+colorscheme goodwolf
 
 " Reload the colorscheme whenever we write the file.
 augroup color_badwolf_dev
     au!
     au BufWritePost badwolf.vim color badwolf
+    au BufWritePost goodwolf.vim color goodwolf
 augroup END
 
 " Highlight VCS conflict markers
@@ -518,21 +519,17 @@
 " }}}
 " Quick editing ----------------------------------------------------------- {{{
 
-nnoremap <leader>ev :vsplit $MYVIMRC<cr>
-nnoremap <leader>eV :vsplit scp://vagrant//<cr>
-nnoremap <leader>ef :vsplit ~/.config/fish/config.fish<cr>
+nnoremap <leader>eb :vsplit ~/Dropbox/bitly.txt<cr>
 nnoremap <leader>ed :vsplit ~/.vim/custom-dictionary.utf-8.add<cr>
-nnoremap <leader>eo :vsplit ~/Dropbox/Org<cr>4j
+nnoremap <leader>ef :vsplit ~/.config/fish/config.fish<cr>
+nnoremap <leader>eg :vsplit ~/.gitconfig<cr>
 nnoremap <leader>eh :vsplit ~/.hgrc<cr>
-nnoremap <leader>eg :vsplit ~/.gitconfig<cr>
+nnoremap <leader>el :vsplit ~/.lispwords<cr>
+nnoremap <leader>em :vsplit ~/.mutt/muttrc<cr>
 nnoremap <leader>ep :vsplit ~/.pentadactylrc<cr>
-nnoremap <leader>em :vsplit ~/.mutt/muttrc<cr>
-nnoremap <leader>ez :vsplit ~/lib/dotfiles/zsh<cr>4j
-nnoremap <leader>ek :vsplit ~/lib/dotfiles/keymando/keymandorc.rb<cr>
+nnoremap <leader>eq :vsplit ~/Dropbox/quotes.txt<cr>Gzz
 nnoremap <leader>et :vsplit ~/.tmux.conf<cr>
-nnoremap <leader>es :vsplit ~/.slate<cr>
-nnoremap <leader>eb :vsplit ~/Dropbox/bitly.txt<cr>
-nnoremap <leader>eq :vsplit ~/Dropbox/quotes.txt<cr>Gzz
+nnoremap <leader>ev :vsplit $MYVIMRC<cr>
 
 " }}}
 " Searching and movement -------------------------------------------------- {{{
@@ -744,6 +741,22 @@
 augroup END
 
 " }}}
+" C# {{{
+
+let g:OmniSharp_selector_ui = 'ctrlp'
+
+augroup ft_csharp
+    au!
+    au FileType cs setlocal foldmethod=marker foldmarker={,}
+    au FileType cs setlocal ts=4 sts=4 sw=4 noexpandtab
+    au FileType cs setlocal foldtext=MyFoldText()
+    au FileType cs inoremap <c-n> <c-x><c-o>
+
+    au FileType cs nnoremap <c-]> :OmniSharpGotoDefinition<cr>
+    au FileType cs nnoremap M :OmniSharpDocumentation<cr>
+augroup END
+
+" }}}
 " Clojure {{{
 
 " extra folding {{{
@@ -838,6 +851,8 @@
 
     " Friendlier Paredit mappings.
     au FileType clojure noremap <buffer> () :<c-u>call PareditWrap("(", ")")<cr>
+    au FileType clojure noremap <buffer> [] :<c-u>call PareditWrap("[", "]")<cr>
+    au FileType clojure noremap <buffer> {} :<c-u>call PareditWrap("{", "}")<cr>
     au FileType clojure noremap <buffer> (( :<c-u>call PareditMoveLeft()<cr>
     au FileType clojure noremap <buffer> )( :<c-u>call PareditSplice()<cr>
     au FileType clojure noremap <buffer> )) :<c-u>call PareditMoveRight()<cr>
@@ -875,14 +890,18 @@
 " }}}
 " Common Lisp {{{
 
+function! HighlightLispRepl() "{{{
+    " set syntax=lisp
+    syn match replPrompt /\v^[-._a-zA-Z]+\>/
+    syn match replComment /\v^;.*/
+
+    " syn match replResult /\v^#\<[^>]+\>$/
+    hi def link replResult Debug
+    hi def link replComment Comment
+endfunction "}}}
 function! OpenLispRepl() "{{{
-    NeoRepl lisp
-    set syntax=lisp
-    syn match replPrompt /\v^\*/
-    syn match replPrompt /\v^[-_a-zA-Z]+\>/
-
-    syn match replResult /\v^#\<[^>]+\>$/
-    hi def link replResult Debug
+    NeoRepl nrepl
+    call HighlightLispRepl()
 endfunction "}}}
 function! SetLispWords() "{{{
     setlocal isk+=.
@@ -897,10 +916,23 @@
     setlocal lispwords+=cswitch
     setlocal lispwords+=eswitch
     setlocal lispwords+=when-let
+    setlocal lispwords+=test
+    setlocal lispwords+=.let*
+
+    " optima
     setlocal lispwords+=optima:match
     setlocal lispwords+=match
-    setlocal lispwords+=test
-    setlocal lispwords+=.let*
+
+    " defstar
+    setlocal lispwords+=defun*
+    setlocal lispwords+=defmethod*
+    setlocal lispwords+=defgeneric*
+    setlocal lispwords+=defvar*
+    setlocal lispwords+=defparameter*
+    setlocal lispwords+=flet*
+    setlocal lispwords+=labels*
+    setlocal lispwords+=lambda*
+    setlocal lispwords+=*let
 endfunction "}}}
 function! SendLispForm() "{{{
     let view = winsaveview()
@@ -955,7 +987,7 @@
 augroup ft_commonlisp
     au!
 
-    au BufNewFile,BufRead *.asd setfiletype lisp
+    au BufNewFile,BufRead *.asd set filetype=lisp
 
     au FileType lisp call SetLispWords()
 
@@ -1026,10 +1058,20 @@
     au FileType lisp nmap <buffer> gi mz:silent normal99[(<cr>v%='z
     " ])
 
-    au FileType lisp setlocal equalprg=LISP=sbcl\ lispindent
+    au FileType lisp setlocal equalprg=lispindentclean
 
     " s/it/happening/
     au FileType lisp silent! call OozeMapKeys()
+    au FileType lisp nnoremap <buffer> <silent> <localleader>o :call OpenLispRepl()<cr>
+    au FileType lisp nnoremap <buffer> <silent> <localleader>p :call SendToplevelLispForm()<cr>
+    au FileType lisp nnoremap <buffer> <silent> <localleader>c :call NeoReplSendRaw("nil\n")<cr>
+
+    " Navigate trees of sexps with arrows
+    au FileType lisp call s:vim_sexp_mappings()
+    au FileType lisp noremap <buffer> <left> :<c-u>call SexpBack()<cr>
+    au FileType lisp noremap <buffer> <right> :<c-u>call SexpForward()<cr>
+    au FileType lisp noremap <buffer> <up> :<c-u>call SexpUp()<cr>
+    au FileType lisp noremap <buffer> <down> :<c-u>call SexpDown()<cr>
 augroup END
 
 " }}}
@@ -1309,7 +1351,7 @@
 
     au FileType java setlocal foldmethod=marker
     au FileType java setlocal foldmarker={,}
-    au FileType java inoremap <c-n> <c-x><c-n>
+    au FileType java inoremap <c-n> <c-x><c-]>
 augroup END
 
 " }}}
@@ -1739,7 +1781,7 @@
     call NeoReplSendRaw("(describe '" . input("? ") . ")\n")
 endfunction "}}}
 
-augroup ft_commonlisp
+augroup ft_scheme
     au!
 
     " key  desc                   mnemonic
@@ -2040,6 +2082,7 @@
     au FileType puppet setlocal commentstring=#\ %s
     au FileType fish setlocal commentstring=#\ %s
     au FileType gnuplot setlocal commentstring=#\ %s
+    au FileType cs setlocal commentstring=//\ %s
 augroup END
 
 " }}}
@@ -2089,6 +2132,7 @@
 " DelimitMate {{{
 
 let delimitMate_excluded_ft = "clojure,lisp"
+let delimitMate_expand_cr = 1
 
 " }}}
 " Dispatch {{{
@@ -2304,6 +2348,11 @@
 let g:pymode_rope_always_show_complete_menu = 0
 
 " }}}
+" Rainbow Parentheses {{{
+
+let g:rbpt_max = 1
+
+" }}}
 " Scratch {{{
 
 command! ScratchToggle call ScratchToggle()