Skip to content

Commit

Permalink
Add *edit-buffer-directory* to vi-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gos-k committed Oct 21, 2024
1 parent f750fd6 commit 4bbd65b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions extensions/vi-mode/ex-command.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@
:execute-set-command)
(:import-from :lem-vi-mode/utils
:change-directory*
:expand-filename-modifiers))
:expand-filename-modifiers)
(:export :*edit-buffer-directory*))
(in-package :lem-vi-mode/ex-command)

(defvar *edit-buffer-directory* nil)

(defun ex-edit (filename force)
(if (string= filename "")
(lem:revert-buffer force)
(with-jumplist
(lem:find-file (merge-pathnames (expand-filename-modifiers filename)
(uiop:getcwd))))))
(if *edit-buffer-directory*
(lem:buffer-directory)
(uiop:getcwd)))))))

(defun ex-write (range filename touch)
(case (length range)
Expand Down

0 comments on commit 4bbd65b

Please sign in to comment.