9d1fa2c39196

More
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 15 Jul 2016 13:17:16 +0000
parents 171b0efe559d
children 626fe4b54a5c
branches/tags (none)
files ccl-init.lisp eclrc sbclrc vim/vimrc weechat/python/autoload/quotes.py

Changes

--- a/ccl-init.lisp	Thu Jul 14 22:45:37 2016 +0000
+++ b/ccl-init.lisp	Fri Jul 15 13:17:16 2016 +0000
@@ -3,8 +3,8 @@
 
 (defun sjl-lisp-prompt-format (stream level)
   (if (zerop level)
-    (format stream "~A> " (package-name *package*))
-    (format stream "[~d] > " level)))
+    (format stream "~%[ClozureCL] ~A> " (package-name *package*))
+    (format stream "~%[~d] > " level)))
 
 (setf ccl:*listener-prompt-format* #'sjl-lisp-prompt-format)
 
--- a/eclrc	Thu Jul 14 22:45:37 2016 +0000
+++ b/eclrc	Fri Jul 15 13:17:16 2016 +0000
@@ -1,1 +1,16 @@
 (setf compiler:*user-cc-flags* "-Wno-shift-negative-value")
+
+(defvar *last-package* nil)
+(defvar *cached-prompt* nil)
+
+(defun sjl-prompt ()
+  (when (not (eq *last-package* *package*))
+    (setf *cached-prompt*
+          (format nil "~%[ECL] ~A> "
+                  (or (first (package-nicknames *package*))
+                      (package-name *package*))))
+    (setf *last-package* *package*))
+  (terpri)
+  (princ *cached-prompt*))
+
+(setf system:*tpl-prompt-hook* #'sjl-prompt)
--- a/sbclrc	Thu Jul 14 22:45:37 2016 +0000
+++ b/sbclrc	Fri Jul 15 13:17:16 2016 +0000
@@ -12,11 +12,11 @@
 (defvar *cached-prompt* nil)
 
 (defun package-prompt (stream)
-  (unless (eq *last-package* *package*)
+  (when (not (eq *last-package* *package*))
     (setf *cached-prompt*
-          (concatenate 'string (or (first (package-nicknames *package*))
-                                   (package-name *package*))
-                       "> "))
+          (format nil "~%[SBCL] ~A> "
+                  (or (first (package-nicknames *package*))
+                      (package-name *package*))))
     (setf *last-package* *package*))
   (terpri)
   (princ *cached-prompt* stream))
--- a/vim/vimrc	Thu Jul 14 22:45:37 2016 +0000
+++ b/vim/vimrc	Fri Jul 15 13:17:16 2016 +0000
@@ -855,7 +855,7 @@
 " Helper Functions {{{
 function! HighlightLispRepl() "{{{
     " set syntax=lisp
-    syn match replPrompt /\v^[-._a-zA-Z0-9]+\>/
+    syn match replPrompt /\v^\[([a-zA-Z])+\] [-._a-zA-Z0-9]+\>/
     syn match replComment /\v^;.*/
 
     " syn match replResult /\v^#\<[^>]+\>$/
--- a/weechat/python/autoload/quotes.py	Thu Jul 14 22:45:37 2016 +0000
+++ b/weechat/python/autoload/quotes.py	Fri Jul 15 13:17:16 2016 +0000
@@ -66,7 +66,7 @@
         f.write("\n---\n")
         f.write('\n'.join(lines))
 
-    subprocess.call(["vim", QUOTE_FILE,
+    subprocess.call(["nvim", QUOTE_FILE,
                      # start at the bottom of the file
                      "+",
                      # move up N lines, where N is how many we appended
@@ -84,7 +84,7 @@
     with open(COPY_FILE, 'w') as f:
         f.write('\n'.join(lines))
 
-    subprocess.call(["vim", COPY_FILE,
+    subprocess.call(["nvim", COPY_FILE,
                      # start at the bottom of the file
                      "+"])
     weechat.command("", "/window refresh")