# HG changeset patch # User Steve Losh # Date 1555465611 14400 # Node ID 855cbad5f857f6f18d24ca2378bc14ee5c8042ae # Parent ad00851f941106af0ce16c047f029fb13b9772ae Makerlisp stuff diff -r ad00851f9411 -r 855cbad5f857 bin/makerlisp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/makerlisp Tue Apr 16 21:46:51 2019 -0400 @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -euo pipefail + +cd ~/src/makerlisp/src/uSDimage +rlwrap-lisp \ + --only-cook '^> ' \ + ../lisp/linux/lisp diff -r ad00851f9411 -r 855cbad5f857 bin/makerlisp-raw --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/makerlisp-raw Tue Apr 16 21:46:51 2019 -0400 @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -euo pipefail + +cd ~/src/makerlisp/src/uSDimage +../lisp/linux/lisp "$@" diff -r ad00851f9411 -r 855cbad5f857 bin/rlwrap-lisp --- a/bin/rlwrap-lisp Sat Apr 13 10:37:06 2019 -0400 +++ b/bin/rlwrap-lisp Tue Apr 16 21:46:51 2019 -0400 @@ -1,6 +1,6 @@ #!/usr/bin/env bash -rlwrap -m$ \ +rlwrap -m$$$$ \ --multi-line-ext .lisp \ -a___ \ --only-cook '^\[[a-zA-Z ]+\] [-a-zA-Z0-9._/]+>' \ diff -r ad00851f9411 -r 855cbad5f857 vim/bundle/neorepl/plugin/neorepl.vim --- a/vim/bundle/neorepl/plugin/neorepl.vim Sat Apr 13 10:37:06 2019 -0400 +++ b/vim/bundle/neorepl/plugin/neorepl.vim Tue Apr 16 21:46:51 2019 -0400 @@ -32,6 +32,8 @@ endfunction " }}} function! NeoReplSendSelection() " {{{ + " Make sure you've DESELECTEDthe text before calling this, otherwise it'll + " run once per text line because Vim hates me. let old_z = @z normal! gv"zy diff -r ad00851f9411 -r 855cbad5f857 vim/vimrc --- a/vim/vimrc Sat Apr 13 10:37:06 2019 -0400 +++ b/vim/vimrc Tue Apr 16 21:46:51 2019 -0400 @@ -923,10 +923,16 @@ call HighlightLispRepl() endfunction "}}} +function! OpenLispReplMakerlisp() "{{{ + NeoRepl makerlisp +endfunction "}}} +function! OpenLispReplMakerlispRaw() "{{{ + NeoRepl makerlisp-raw +endfunction "}}} + function! OpenLispReplSBCL() "{{{ NeoRepl sbcl-vlime endfunction "}}} - function! OpenLispReplSBCLRaw() "{{{ NeoRepl sbcl-vlime-raw endfunction "}}} @@ -1583,6 +1589,65 @@ augroup END " }}} +" Makerlisp {{{ + +function! HighlightMakerlispRepl() "{{{ + setlocal nolist + + " set syntax=lisp + syn match replPrompt /\v^\>/ + syn match replComment /\v^;.*/ + + " syn match replResult /\v^#\<[^>]+\>$/ + hi def link replResult Debug + hi def link replComment Comment +endfunction "}}} + +function! SendEntireFile() "{{{ + let view = winsaveview() + + execute "normal! ggVG\" + call NeoReplSendSelection() + + call winrestview(view) +endfunction "}}} + +function! OpenLispReplMakerlispRaw() "{{{ + NeoRepl makerlisp-raw + call HighlightMakerlispRepl() +endfunction "}}} + +augroup ft_makerlisp " {{{ + au! + + au BufNewFile,BufRead *.l set filetype=makerlisp + au BufNewFile,BufRead *.l setlocal syntax=lisp + + au FileType makerlisp nnoremap U :syntax sync fromstart:redraw!:call TurnOnLispFolding() + au FileType makerlisp call SetLispWords() + au FileType makerlisp call EnableParedit() + au FileType makerlisp silent! call TurnOnLispFolding() + au FileType makerlisp RainbowParenthesesActivate + au FileType makerlisp setlocal iskeyword+=!,?,%,- + au FileType makerlisp setlocal lisp + au FileType makerlisp setlocal equalprg=lispindent + + " Open REPL + au FileType makerlisp nnoremap Om :call OpenLispReplMakerlispRaw() + + " Misc mappings + au FileType makerlisp nnoremap gi :call IndentToplevelLispForm() + au FileType makerlisp nnoremap [] :call DuplicateLispForm() + au FileType makerlisp nnoremap ( :call PareditToggle() + + au FileType makerlisp nnoremap e :call SendToplevelLispForm() + au FileType makerlisp nnoremap f :call SendEntireFile() + au FileType makerlisp nnoremap c :call NeoReplSendRaw("(cls)") + + ") +augroup END " }}} + +" }}} " Markdown {{{ augroup ft_markdown @@ -2163,6 +2228,7 @@ au FileType htmldjango setlocal commentstring={#\ %s\ #} au FileType clojurescript setlocal commentstring=;\ %s au FileType lisp setlocal commentstring=;;\ %s + au FileType makerlisp setlocal commentstring=;;\ %s au FileType puppet setlocal commentstring=#\ %s au FileType fish setlocal commentstring=#\ %s au FileType gnuplot setlocal commentstring=#\ %s