e7642253ffde

More shit
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sat, 05 Dec 2015 22:46:56 +0000
parents d1d3411ab22e
children 6a75b5bfa46c
branches/tags (none)
files .hgsub .hgsubstate bin/bencode bin/bootstrap.sh bin/lisp sbclrc vim/after/plugin/fireplace-cl-nrepl.vim vim/after/syntax/lisp.vim vim/ftplugin/lisp/lispfolding.vim vim/indent/lisp.vim vim/syntax/lisp.vim vim/vimrc

Changes

--- a/.hgsub	Tue Dec 01 12:35:31 2015 +0000
+++ b/.hgsub	Sat Dec 05 22:46:56 2015 +0000
@@ -6,6 +6,7 @@
 vim/bundle/ack                   = [git]git://github.com/mileszs/ack.vim.git
 vim/bundle/argumentative         = [git]git://github.com/PeterRincker/vim-argumentative.git
 vim/bundle/badwolf               = [hg]https://bitbucket.org/sjl/badwolf/
+vim/bundle/bencode               = [hg]https://bitbucket.org/sjl/vim-bencode/
 vim/bundle/clam                  = [hg]https://bitbucket.org/sjl/clam.vim/
 vim/bundle/clojure-static        = [git]git://github.com/sjl/vim-clojure-static.git
 vim/bundle/commentary            = [git]git://github.com/tpope/vim-commentary.git
--- a/.hgsubstate	Tue Dec 01 12:35:31 2015 +0000
+++ b/.hgsubstate	Sat Dec 05 22:46:56 2015 +0000
@@ -5,7 +5,8 @@
 d64ce06650cf9b098b5a01c0db53864965d9310b vim/bundle/abolish
 f183a345a0c10caed7684d07dabae33e007c7590 vim/bundle/ack
 6c4663589e73e21e77a9ea8403dcf2bf6cf9c11c vim/bundle/argumentative
-db3707cbd8706f4bb054959ecc5cee82ac45687b vim/bundle/badwolf
+22156d26f2e30050d2e240d5109e5ec5f4dec4b4 vim/bundle/badwolf
+1f8c437ae3c898e5481d1d8d4ca9ecacb79d4edc vim/bundle/bencode
 8533fffd9fbb690dfc8e334f91a10c72e35a6dce vim/bundle/clam
 5201a3860dbc32814f44eaf9386245caa70a65e6 vim/bundle/clojure-static
 dc349bb7d30f713d770fc1fa0fe209e6aab82dc8 vim/bundle/commentary
--- a/bin/bencode	Tue Dec 01 12:35:31 2015 +0000
+++ b/bin/bencode	Sat Dec 05 22:46:56 2015 +0000
@@ -93,7 +93,7 @@
         encode_int(1, r)
     else:
         encode_int(0, r)
-        
+
 def encode_string(x, r):
     r.extend((str(len(x)), ':', x))
 
--- a/bin/bootstrap.sh	Tue Dec 01 12:35:31 2015 +0000
+++ b/bin/bootstrap.sh	Sat Dec 05 22:46:56 2015 +0000
@@ -51,6 +51,7 @@
 ensure_link "lib/dotfiles/fish/config.fish"    ".config/fish/config.fish"
 ensure_link "lib/dotfiles/fish/functions"      ".config/fish/functions"
 ensure_link "lib/dotfiles/ipython"             ".ipython"
+ensure_link "lib/dotfiles/sbclrc"              ".sbclrc"
 
 echo remember to copy the notmuch-config
 echo completed
--- a/bin/lisp	Tue Dec 01 12:35:31 2015 +0000
+++ b/bin/lisp	Sat Dec 05 22:46:56 2015 +0000
@@ -2,4 +2,4 @@
 
 set -e
 
-rlwrap sbcl --load ~/.quicklisp/setup.lisp "$@"
+rlwrap sbcl "$@"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbclrc	Sat Dec 05 22:46:56 2015 +0000
@@ -0,0 +1,29 @@
+;;; The following lines added by ql:add-to-init-file:
+#-quicklisp
+(let ((quicklisp-init (merge-pathnames ".quicklisp/setup.lisp"
+                                       (user-homedir-pathname))))
+  (when (probe-file quicklisp-init)
+    (load quicklisp-init)))
+;;;
+
+(pushnew "~/lib/asdf/" asdf:*central-registry* :test #'equal)
+
+; (require 'sb-int)
+; (setf sb-int:*repl-prompt-function*
+;       (lambda (stream)
+;         (format stream "~&~A> " *package*)))
+
+(defvar *last-package* nil)
+(defvar *cached-prompt* nil)
+
+(defun package-prompt (stream)
+  (unless (eq *last-package* *package*)
+    (setf *cached-prompt*
+          (concatenate 'string (or (first (package-nicknames *package*))
+                                   (package-name *package*))
+                       "> "))
+    (setf *last-package* *package*))
+  (terpri)
+  (princ *cached-prompt* stream))
+
+(setf sb-int:*repl-prompt-fun* #'package-prompt)
--- a/vim/after/plugin/fireplace-cl-nrepl.vim	Tue Dec 01 12:35:31 2015 +0000
+++ b/vim/after/plugin/fireplace-cl-nrepl.vim	Sat Dec 05 22:46:56 2015 +0000
@@ -9,17 +9,17 @@
 	command! -buffer -bang -range=0 -nargs=? Eval :exe s:Eval(<bang>0, <line1>, <line2>, <count>, <q-args>)
 	command! -buffer -bar -nargs=1 -complete=customlist,fireplace#eval_complete Doc     :exe s:Doc(<q-args>)
 
-	nmap <buffer> cp <Plug>FireplacePrint
-	nmap <buffer> cpp <Plug>FireplaceCountPrint
+	" nmap <buffer> cp <Plug>FireplacePrint
+	" nmap <buffer> cpp <Plug>FireplaceCountPrint
 
-	nmap <buffer> cm <Plug>FireplaceMacroExpand
-	nmap <buffer> cmm <Plug>FireplaceCountMacroExpand
+	" nmap <buffer> cm <Plug>FireplaceMacroExpand
+	" nmap <buffer> cmm <Plug>FireplaceCountMacroExpand
 
-	nmap <buffer> cqp <Plug>FireplacePrompt
+	" nmap <buffer> cqp <Plug>FireplacePrompt
 
-	map! <buffer> <C-R>( <Plug>FireplaceRecall
+	" map! <buffer> <C-R>( <Plug>FireplaceRecall
 
-	nmap <buffer> K <Plug>FireplaceK
+	" nmap <buffer> M <Plug>FireplaceK
 endfunction
 
 if !exists('s:qffiles')
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vim/after/syntax/lisp.vim	Sat Dec 05 22:46:56 2015 +0000
@@ -0,0 +1,8 @@
+" don't know why this doesn't work in very-magic mode but fuck it, whatever,
+" this works i don't care
+syn match lispKey "\k\@<!:\k\+"
+syn match lispDecl "define-\k\+"
+syn keyword lispDecl defmethod defvar defparameter
+
+syn match lispString !#\\[\(\)]!
+
--- a/vim/ftplugin/lisp/lispfolding.vim	Tue Dec 01 12:35:31 2015 +0000
+++ b/vim/ftplugin/lisp/lispfolding.vim	Sat Dec 05 22:46:56 2015 +0000
@@ -6,6 +6,7 @@
 " ---------------------------------------------------------------------------
 "  Automagic Lisp folding on defn's and defmacro's
 "
+
 function GetLispFold()
       if getline(v:lnum) =~ '^\s*(defun.*\s'
             return ">1"
@@ -21,6 +22,8 @@
             return ">1"
       elseif getline(v:lnum) =~ '^\s*(defstruct.*\s'
             return ">1"
+      elseif getline(v:lnum) =~ '^\s*(define-.*\s'
+            return ">1"
       elseif getline(v:lnum) =~ '^\s*$'
             let my_lispnum = v:lnum
             let my_lispmax = line("$")
--- a/vim/indent/lisp.vim	Tue Dec 01 12:35:31 2015 +0000
+++ b/vim/indent/lisp.vim	Sat Dec 05 22:46:56 2015 +0000
@@ -42,6 +42,7 @@
 let s:spec_indent = 'flet\|labels\|macrolet\|symbol-macrolet'
                                                           " List of symbols need special indenting
 let s:spec_param = 'defmacro'                             " List of symbols with special parameter list
+
 let s:binding_form = 'let\|let\*'                         " List of symbols with binding list
 
 " Get the filetype (Lisp dialect) used by Slimv
@@ -313,6 +314,10 @@
             if match( func, 'defgeneric$' ) >= 0 || match( func, 'defsystem$' ) >= 0 || match( func, 'aif$' ) >= 0
                 return c + 1
             endif
+
+            if match( func, 'define-' ) >= 0
+                return c + 1
+            endif
         endif
         " Remove package specification
         let func = substitute(func, '^.*:', '', '')
--- a/vim/syntax/lisp.vim	Tue Dec 01 12:35:31 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-" don't know why this doesn't work in very-magic mode but fuck it, whatever,
-" this works i don't care
-syn match lispKey "\k\@<!:\k\+"
--- a/vim/vimrc	Tue Dec 01 12:35:31 2015 +0000
+++ b/vim/vimrc	Sat Dec 05 22:46:56 2015 +0000
@@ -1536,6 +1536,16 @@
 augroup END
 
 " }}}
+" Sage {{{
+
+augroup ft_sage
+    au!
+
+    autocmd BufNewFile,BufRead *.sage set filetype=python
+    autocmd BufNewFile,BufRead *.sagews set filetype=python
+augroup END
+
+" }}}
 " Scala {{{
 
 function! DispatchMavenTest()
@@ -2614,8 +2624,9 @@
 " searches line-by-line.
 
 nnoremap <silent> <leader>A :set opfunc=<SID>AckMotion<CR>g@
-xnoremap <silent> <leader>A :<C-U>call <SID>AckMotion(visualmode())<CR>
-
+" xnoremap <silent> <leader>A :<C-U>call <SID>AckMotion(visualmode())<CR>
+
+nnoremap <leader>A :Ack! '\b<c-r><c-w>\b'<cr>
 nnoremap <bs> :Ack! '\b<c-r><c-w>\b'<cr>
 xnoremap <silent> <bs> :<C-U>call <SID>AckMotion(visualmode())<CR>