Comments (4)
Thanks a lot! This works perfectly.
The reason I do not have a scratch buffer on launch is because I launch my emacs with key bound to this command:
emacsclient -c -n -e '(switch-to-buffer nil)'
It opens the Messages buffer immediately on the first startup but it's very handy since it reopens the last buffer I had open when I close my emacs frame.
from general.el.
Try this:
(general-with 'evil
;; (evil-set-initial-state 'messages-buffer-mode 'normal)
;; this won't work (runs too soon it seems)
;; (general-add-hook 'messages-buffer-mode-hook #'evil-normalize-keymaps)
;; this doesn't work
;; (general-add-advice 'after-find-file
;; :after (lambda (&rest _)
;; (when (eq major-mode 'messages-buffer-mode)
;; (evil-normalize-keymaps)
;; t))
;; nil
;; #'identity)
;; this is what fixes things
(general-add-hook 'post-command-hook
(lambda (&rest _)
(when (eq major-mode 'messages-buffer-mode)
(evil-normalize-keymaps)
t))
nil
nil
#'identity))
from general.el.
Thanks for the reply. This seems to work but only if another buffer is visited before messages. Otherwise I need to press SPC (reads it as evil-forward-char) once before it will start using the leader properly.
from general.el.
Do you not have a scratch buffer and visit Messages immediately? Maybe try this:
(general-add-hook 'after-init-hook
(lambda (&rest _)
(when-let ((messages-buffer (get-buffer "*Messages*")))
(with-current-buffer messages-buffer
(evil-normalize-keymaps))))
nil
nil
t)
from general.el.
Related Issues (20)
- Vertico keybindings HOT 6
- Add an option to disable autoloading a command in `use-package` integration HOT 1
- Miscompilation of a `:general` form if binding in Evil's insert mode HOT 3
- Key sequence starts with non-prefix key. HOT 2
- Overriding mapping in minor modes HOT 3
- Rewrite HOT 16
- having seeing latex keys in org mode HOT 1
- How to pass a command list to `general-define-key` HOT 1
- Optimizing for speed: do's and don'ts HOT 9
- Prefix is not working with local leader definer HOT 1
- which-key labels not shown in prefix-command keymaps HOT 1
- General.el byte-compile warning HOT 2
- using multi evil states/keymaps in single general-def
- keymaps not activating keymap during major-mode treemacs HOT 2
- `general-def` is not defined when used in `pre-` or `post-command-hook` HOT 1
- general is not working correctly for emacs-lisp-mode HOT 1
- Using general.el with meow HOT 4
- binding "TAB" in company-active-map to company-complete-selection problem HOT 2
- Creating a toggle to activate/deactivate keybindings HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from general.el.