Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When easy-hugo-newpost in evil-mode, open with evil-insert-state #72

Open
minorugh opened this issue Dec 31, 2022 · 1 comment
Open

Comments

@minorugh
Copy link

minorugh commented Dec 31, 2022

Thanks for providing us with a great script.

By the way, I recently installed evil-mode.
I had some key-bind conflicts, but I have it set up as follows and it works fine.

(add-to-list 'evil-emacs-state-modes 'easy-hugo-mode)

However, only easy-hugo-newpost opens files with evil-nomal-state,
so I redefined the configuration file to open files with
evil-insert-state by adding the following command.

(defun easy-hugo-newpost (post-file)
((...
(when (get-buffer "*hugo*")
  (kill-buffer "*hugo*"))
(find-file filename)
(when evil-mode
  (evil-insert-state))
(goto-char (point-max))
(save-buffer))))

It is never a request for updete, just a report of one evil user.
Thank you very much.

@masasam
Copy link
Owner

masasam commented Dec 31, 2022

Hi @minorugh .
Thank you for report.
I think it would be good to add it to README.md for people using evil-mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants