diff --git a/extensions/vi-mode/options.lisp b/extensions/vi-mode/options.lisp index 0d855c438..a055e9157 100644 --- a/extensions/vi-mode/options.lisp +++ b/extensions/vi-mode/options.lisp @@ -379,25 +379,25 @@ (option-value option)) :test 'equal))))) -(defvar *default-isWORDseparator* (mapcar #'string '(#\Newline #\Space #\Tab))) +(defvar *default-isseparator* (mapcar #'string '(#\Newline #\Space #\Tab))) -(defun compile-isWORDseparator (value) - (compile-rules value "isWORDseparator")) +(defun compile-isseparator (value) + (compile-rules value "isseparator")) -(define-option "isWORDseparator" - ((cons *default-isWORDseparator* - (compile-isWORDseparator *default-isWORDseparator*)) +(define-option "isseparator" + ((cons *default-isseparator* + (compile-isseparator *default-isseparator*)) :type list - :aliases ("isWs") + :aliases ("iss") :scope :buffer) (:documentation "Comma-separated string to specify the characters that should be recognized as non broad word characters. (buffer local) - Aliases: isWs") + Aliases: iss") (:getter (option) (car (option-raw-value option))) (:setter (new-value option) (setf (option-%value option) (cons new-value - (compile-isWORDseparator new-value)))) + (compile-isseparator new-value)))) (:initializer (option) (let ((syntax-table (lem:mode-syntax-table (lem:buffer-major-mode (lem:current-buffer))))) (setf (option-value option) diff --git a/extensions/vi-mode/tests/options.lisp b/extensions/vi-mode/tests/options.lisp index ebbc60ade..473868c9c 100644 --- a/extensions/vi-mode/tests/options.lisp +++ b/extensions/vi-mode/tests/options.lisp @@ -29,17 +29,17 @@ (ok (equalp (option-value "iskeyword") isk) "Another buffer's local option is not changed")))))) -(deftest isWORDseparator-option - (ok (typep (get-option "isWORDseparator") 'option) - "Can get isWORDseparator option") - (ok (typep (get-option "isWs") 'option) - "Can get isWORDseparator option by alias") +(deftest isseparator-option + (ok (typep (get-option "isseparator") 'option) + "Can get isseparator option") + (ok (typep (get-option "iss") 'option) + "Can get isseparator option by alias") (with-fake-interface () (with-vi-buffer (#?"abc\n[(]def)\n") (cmd "E") (ok (buf= #?"abc\n(def[)]\n"))) (with-vi-buffer (#?"abc\n[(]def)\n") - (execute-set-command "isWs+=(") - (execute-set-command "isWs+=)") + (execute-set-command "iss+=(") + (execute-set-command "iss+=)") (cmd "WE") (ok (buf= #?"abc\n(de[f])\n"))))) \ No newline at end of file diff --git a/extensions/vi-mode/word.lisp b/extensions/vi-mode/word.lisp index 5c69450ab..3f00867a1 100644 --- a/extensions/vi-mode/word.lisp +++ b/extensions/vi-mode/word.lisp @@ -31,7 +31,7 @@ (t :non-word)))) (defun non-broad-word-char-p (char) - (funcall (cdr (option-raw-value "isWORDseparator")) + (funcall (cdr (option-raw-value "isseparator")) char)) (defun broad-word-char-type (char)