Commit a078bdf5 authored by Martin Simmons's avatar Martin Simmons
Browse files

Changes to support LispWorks 7.1:

* Use strings instead of characters with bits.
* Call intern with a string.
parent 6c2762d6
......@@ -47,142 +47,143 @@
(apply #'concatenate 'string (mapcar #'string (append list '(#\Return)))))
;; Enter / Exit the modes
(bind-key "All Vim" #\sh-c-escape :global :emacs)
(bind-key "All Vim" #(#\c-\, #\c-\,) :global :emacs)
(bind-key "All Vim" "Shift-Control-Escape" :global :emacs)
(bind-key "All Vim" #("Control-," "Control-,") :global :emacs)
;; Note to all: #\c-w is read as Ctrl-W, that is Ctrl-Shift-w. If you want
;; Ctrl-w (lowercase-w) you need to say #\c-\w.
;; Note to all: within a list of keys, "Control-c" is interpreted as a
;; sequence of 9 keystrokes. If you want the c key with control then use
;; #("Control-c").
(bind-vim-table
`(; control
("Exit Vim Mode" (#\sh-c-escape #(#\c-\, #\c-\,)) :c)
("Vim Insert Mode" #\i :c)
("Vim Append" #\a :c)
("Vim Append at EOL" #\A :c)
("Vim Command Mode" (#\c-[ #\Escape) :i)
("Illegal" (#\c-[ #\Escape) :c)
("Exit Vim Mode" (#("Shift-Control-Escape") #("Control-," "Control-,")) :c)
("Vim Insert Mode" "i" :c)
("Vim Append" "a" :c)
("Vim Append at EOL" "A" :c)
("Vim Command Mode" (#("Control-[") #("Escape")) :i)
("Illegal" (#("Control-[") #("Escape")) :c)
; movement
("Vim Previous Line" (#\k #\-) (:c :o)
(#\up #\c-\p) (:c :i :o))
("Vim Previous Line" ("k" "-") (:c :o)
(#("Up") #("Control-p")) (:c :i :o))
("Vim Previous Screen Line" "gk" (:c :o))
("Vim Next Line" (#\j #\return) (:c :o)
(#\down #\c-\j #\c-\n) (:c :i :o))
("Vim Next Line" ("j" #("Return")) (:c :o)
(#("Down") #("Control-j") #("Control-n")) (:c :i :o))
("Vim Next Screen Line" "gj" (:c :o))
("Vim Backward Character" (#\h #\c-\h #\backspace) (:c :o)
#\left (:c :i :o))
("Vim Forward Character" (#\l #\space) (:c :o)
#\right (:c :i :o))
("Vim Forward Word" #\w (:c :o)
#\c-right (:c :i :o))
("Vim Forward Word End" #\e (:c :o))
("Vim Forward BIGWORD" #\W (:c :o))
("Vim Forward BIGWORD End" #\E (:c :o))
("Vim Backward Word" #\b (:c :o)
#\c-left (:c :i :o))
("Vim Backward Character" ("h" #("Control-h") #("Backspace")) (:c :o)
#("Left") (:c :i :o))
("Vim Forward Character" ("l" #("Space")) (:c :o)
#("Right") (:c :i :o))
("Vim Forward Word" "w" (:c :o)
#("Control-Right") (:c :i :o))
("Vim Forward Word End" "e" (:c :o))
("Vim Forward BIGWORD" "W" (:c :o))
("Vim Forward BIGWORD End" "E" (:c :o))
("Vim Backward Word" "b" (:c :o)
#("Control-Left") (:c :i :o))
("Vim Backward Word End" "ge" (:c :o))
("Vim Backward BIGWORD" #\B (:c :o))
("Vim Backward BIGWORD" "B" (:c :o))
("Vim Backward BIGWORD End" "gE" (:c :o))
("Vim Goto Line or End of File" #\G (:c :o))
("Vim Top of Window" #\H (:c :o))
("Vim Bottom of Window" #\L (:c :o))
("Vim Move to Window Line" #\M (:c :o))
("Vim Goto Line or End of File" "G" (:c :o))
("Vim Top of Window" "H" (:c :o))
("Vim Bottom of Window" "L" (:c :o))
("Vim Move to Window Line" "M" (:c :o))
("Vim Goto Line or Top of Buffer" "gg" (:c :o))
; ("Vim Forward Form" #\) (:c :o))
; ("Vim Backward Form" #\( (:c :o))
("Vim Forward Sentence" #\) (:c :o))
("Vim Backward Sentence" #\( (:c :o))
("Vim Forward List" #\c-\) (:c :o))
("Vim Backward List" #\c-\( (:c :o))
("Vim Beginning of Line" ; for #\0 see Vim Beginning of Line or Collect Count
#\home (:c :i :o))
("Vim End of Line" #\$ (:c :o)
#\end (:c :i :o))
("Back to Indentation" #\^ (:c :o))
; ("Vim Forward Form" ")" (:c :o))
; ("Vim Backward Form" "(" (:c :o))
("Vim Forward Sentence" ")" (:c :o))
("Vim Backward Sentence" "(" (:c :o))
("Vim Forward List" #("Control-)") (:c :o))
("Vim Backward List" #("Control-(") (:c :o))
("Vim Beginning of Line" ; for "0" see Vim Beginning of Line or Collect Count
#("Home") (:c :i :o))
("Vim End of Line" "$" (:c :o)
#("End") (:c :i :o))
("Back to Indentation" "^" (:c :o))
("Beginning of Defun" "[\\" (:c :o))
("End of Defun" "]\\" (:c :o))
("Vim To Column N" #\| (:c :o))
("Vim To Column N" "|" (:c :o))
; Visual mode
("Vim Visual Mode" #\v :c)
("Vim Visual Mode" "v" :c)
; yank / put
; ("Save Region" #\y :c)
("Vim Put Before" #\P :c)
("Vim Put After" #\p :c)
; ("Save Region" "y" :c)
("Vim Put Before" "P" :c)
("Vim Put After" "p" :c)
; scrolling
("Scroll Window Down" #\c-\f (:c :o))
("Scroll Window Up" #\c-\b (:c :o))
("Vim Scroll Window Up" (#\c-\y #\sh-up) (:c :i :o))
("Vim Scroll Window Down" (#\c-\e #\sh-down) (:c :i :o))
("Vim Scroll Line to Top of Window" ("zt" #(#\z #\Return)) (:c :o))
("Scroll Window Down" #("Control-f") (:c :o))
("Scroll Window Up" #("Control-b") (:c :o))
("Vim Scroll Window Up" (#("Control-y") #("Shift-Up")) (:c :i :o))
("Vim Scroll Window Down" (#("Control-e") #("Shift-Down")) (:c :i :o))
("Vim Scroll Line to Top of Window" ("zt" #("z" "Return")) (:c :o))
("Vim Scroll Line to Middle of Window" ("zz" "z.") (:c :o))
("Vim Scroll Line to Bottom of Window" ("zb" "z-") (:c :o))
; Repeating
("Vim Repeat" #\. :c)
("Vim Argument Digit" (#\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9) (:c :o))
("Vim Beginning of Line or Collect Count" #\0 #| zero |# (:c :o))
("Vim Repeat" "." :c)
("Vim Argument Digit" ("1" "2" "3" "4" "5" "6" "7" "8" "9") (:c :o))
("Vim Beginning of Line or Collect Count" "0" #| zero |# (:c :o))
; changes
("Vim Delete Next Character" #\x :c)
("Vim Delete Previous Character" #\X :c)
("Vim Replace Character" #\r :c)
("Vim Append Text at End of Line" #\A :c)
("Vim Insert Text at Beginning of Line" #\I :c)
("Vim Delete Motion" #\d :c)
("Vim Change Motion" #\c :c)
("Vim Yank Motion" #\y :c)
("Vim Kill To End Of Line" #\D :c)
("Vim Yank Line" #\Y :c)
("Vim Move Over Whole Line" (#\d #\y) :o) ; used for "dd" and "yy"
("Vim Delete Next Character" "x" :c)
("Vim Delete Previous Character" "X" :c)
("Vim Replace Character" "r" :c)
("Vim Append Text at End of Line" "A" :c)
("Vim Insert Text at Beginning of Line" "I" :c)
("Vim Delete Motion" "d" :c)
("Vim Change Motion" "c" :c)
("Vim Yank Motion" "y" :c)
("Vim Kill To End Of Line" "D" :c)
("Vim Yank Line" "Y" :c)
("Vim Move Over Whole Line" ("d" "y") :o) ; used for "dd" and "yy"
("Vim Move Over Inner Word" "iw" :o)
("Vim Move Over A Word" "aw" :o)
("Vim Move Over Inner BigWord" "iW" :o)
("Vim Move Over A BigWord" "aW" :o)
("Vim Open Line Down" #\o :c)
("Vim Open Line Up" #\O :c)
("Vim Undo" #\u :c)
("Vim Open Line Down" "o" :c)
("Vim Open Line Up" "O" :c)
("Vim Undo" "u" :c)
("Lowercase Word" "~w" :c)
; ("Lowercase Region" "vu" :c)
; ("Uppercase Region" "vU" :c)
("Indent Rigidly" ">>" :c)
("Vim Join Lines" #\J :c)
("Vim Join Lines" "J" :c)
("Vim Insert Character Above Cursor" #\c-\y :i)
("Vim Insert Character Below Cursor" #\c-\e :i)
("Vim Insert Character Above Cursor" #("Control-y") :i)
("Vim Insert Character Below Cursor" #("Control-e") :i)
; buffer / window manipulation
("New Buffer" ":n" :c)
("New Window" #(#\c-\w #\n) :c)
("Next Ordinary Window" #(#\c-\w #\j) :c)
("Previous Window" #(#\c-\w #\k) :c)
("Delete Window" #(#\c-\w #\c) :c)
("New Window" #("Control-w" "n") :c)
("Next Ordinary Window" #("Control-w" "j") :c)
("Previous Window" #("Control-w" "k") :c)
("Delete Window" #("Control-w" "c") :c)
("List Buffers" ,(add-return ":ls") :c)
("Circulate Buffers" ,(add-return ":bn") :c)
("Select Buffer" ":b " :c)
; search
("Vim ISearch Forward Regexp" #\/ (:c :o))
("Vim ISearch Backward Regexp" #\? (:c :o))
("Vim Find Next" #\n (:c :o))
("Vim Find Previous" #\N (:c :o))
("Vim ISearch Forward Regexp" "/" (:c :o))
("Vim ISearch Backward Regexp" "?" (:c :o))
("Vim Find Next" "n" (:c :o))
("Vim Find Previous" "N" (:c :o))
("List Matching Lines" ":gp" :c) ; not in Vim, exactly
("Delete Matching Lines" ":gd" :c) ; not in Vim
("Vim Regexp Forward Search" #\c-\/ (:c :o))
("Vim Regexp Reverse Search" #\c-\? (:c :o))
("Vim Find Char Right" #\f (:c :o))
("Vim Find Char Left" #\F (:c :o))
("Vim Find Till Char Right" #\t (:c :o))
("Vim Find Till Char Left" #\T (:c :o))
("Vim Repeat Last Find Char" #\; (:c :o))
("Vim Repeat Last Find Char Opposite" #\, (:c :o))
("Vim Regexp Forward Search" #("Control-/") (:c :o))
("Vim Regexp Reverse Search" #("Control-?") (:c :o))
("Vim Find Char Right" "f" (:c :o))
("Vim Find Char Left" "F" (:c :o))
("Vim Find Till Char Right" "t" (:c :o))
("Vim Find Till Char Left" "T" (:c :o))
("Vim Repeat Last Find Char" ";" (:c :o))
("Vim Repeat Last Find Char Opposite" "," (:c :o))
; File manipulation
("Save File" ,(add-return ":w") :c)
......@@ -195,15 +196,15 @@
("Vim Goto File" "gf" :c)
; tagging
("Find Source" #\c-\] :c)
("Find Source" #("Control-]") :c)
("Continue Tags Search" ,(add-return ":tn") :c)
("View Source Search" ,(add-return ":ts") :c)
))
;;; counts; may change later; for now just use Argument Digit
; (bind-vim-command "Argument Digit" '(#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9))
; (bind-vim-command "What Cursor Position" '(#(#\g #\Ctrl-\Meta-\g)))
; (bind-vim-command "vim beginning of line or collect count" #\0)
; (bind-vim-command "Argument Digit" '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9"))
; (bind-vim-command "What Cursor Position" '(#("g" "Control-Meta-g")))
; (bind-vim-command "vim beginning of line or collect count" "0")
(defun restore-default-highlighting ()
;; There may be a better way to do this. Like remembering all the
......@@ -239,15 +240,15 @@
("Evaluate Defun In Listener" ",l" :c)))
;;; Vim Insert mode
; (bind-vim-insert "Indent New Line" #\Return)
; (bind-vim-insert "New Line" #\Newline)
; (bind-vim-insert "New Line" #\Return)
; (bind-vim-insert "Indent New Line" #("Return"))
; (bind-vim-insert "New Line" #("Newline"))
; (bind-vim-insert "New Line" #("Return"))
;;; Larry's favorite mappings
(bind-vim-table
'(("Vim Save All Files" #\c-F12 (:c :i))
("List Buffers" #\F7 (:c :i))
("Circulate Buffers" #\c-F10 :c)))
'(("Vim Save All Files" #("Control-F12") (:c :i))
("List Buffers" #("F7") (:c :i))
("Circulate Buffers" #("Control-F10") :c)))
;;; Ignore everything not defined
......
......@@ -7,7 +7,7 @@
(defmode "Vim Visual")
(defvar *orig-meta-prefix-gesture-spec* editor::*meta-prefix-gesture-spec*)
(defvar *orig-interrupt-keys* '(#\c-g))
(defvar *orig-interrupt-keys* '("Control-g" "Control-G"))
(defcommand "All Vim" (p)
"Put all buffers in Vim Command mode."
......
......@@ -354,9 +354,7 @@
; *vim-last-action* #'identity
*vim-repeat-multiplier* nil)
)
(setf editor::*meta-prefix-gesture-spec* (sys::make-gesture-spec
(char-code #\C-Escape)
sys:gesture-spec-control-bit))
(setf editor::*meta-prefix-gesture-spec* (sys:coerce-to-gesture-spec "Control-Escape"))
; fixme: can't seem to have the meta-prefix-gesture and the interrupt key be the same key
#+nil
(set-interrupt-keys '(#\escape)))
......
......@@ -2,11 +2,11 @@
(eval-when (:compile-toplevel :load-toplevel :execute)
(defmacro wrap-editor-function (symbol)
(let ((editor-symbol (intern symbol :editor)))
(let ((editor-symbol (intern (string symbol) :editor)))
`(defun ,symbol (&rest rest)
(apply ',editor-symbol rest))))
(defmacro wrap-editor-macro (symbol)
(let ((editor-symbol (intern symbol :editor)))
(let ((editor-symbol (intern (string symbol) :editor)))
`(defmacro ,symbol (&rest rest)
`(,',editor-symbol ,@rest))))
(editor:setup-indent 'wrap-list-with 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment