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

[CONFIG] evil setup #160

Closed
oatmealm opened this issue Jul 25, 2024 · 3 comments · Fixed by #166
Closed

[CONFIG] evil setup #160

oatmealm opened this issue Jul 25, 2024 · 3 comments · Fixed by #166

Comments

@oatmealm
Copy link

I have evil enabled (in doom) and set ekg up this way :

(set-evil-initial-state! 'ekg-notes-mode 'normal) ; that's the default in anycase 
  (evil-define-key 'normal ekg-notes-mode-map
    "A" 'ekg-notes-any-tags
    "B" 'ekg-notes-select-and-browse-url
    "a" 'ekg-notes-any-note-tags
    "b" 'ekg-notes-browse
    "c" 'ekg-notes-create
    "d" 'ekg-notes-delete
    "g" 'ekg-notes-refresh
    "k" 'ekg-notes-kill
    "n" 'ekg-notes-next ;; or "j"
    "o" 'ekg-notes-open
    "p" 'ekg-notes-previous ;; or "k"
    "q" 'kill-buffer-and-window
    "t" 'ekg-notes-tag)

I use kill-buffer-and-window to kill also the window, which otherwise hangs around. It happens with othe ekg window/buffers btw, which is messy from a UI point of view for me at least.

@ahyatt
Copy link
Owner

ahyatt commented Jul 26, 2024

i see, so the bug is that we should also kill the window? Is the thinking that since we created the window we should also kill it? I think that makes sense - maybe we should change this keybinding. Or maybe we should just not create a window when running ekg commands. I can't recall why I decided to do that, but will think about the best solution here. Thanks for pointing this out!

@oatmealm
Copy link
Author

Yes it's a good question. I guess creating a window makes sense, but if created, killing the buffer this way seems messy to me.

I'm pretty sure I would love it if opening a note from ekg-notes, for example, would split the window vertically and when I'm done (C-c...) will kill the buffer and window. In a workflow where you open multiple notes, you'd then should probably consider creating another window, rather than reusing the first window, assuming you want all the notes fully visible... etc.

In either case closing the window when done makes sense to me, unless ekg opened the note in a window already showing another buffer I was working in.

I don't have a preferred workflow for ekg yet, so I think more input from users would help.

ahyatt added a commit that referenced this issue Aug 18, 2024
This is different than what is done now, which is to show it in another
window (making a new window if necessary).

This will fix #160
@ahyatt ahyatt closed this as completed in 789cb6d Aug 18, 2024
@ahyatt
Copy link
Owner

ahyatt commented Aug 18, 2024

I've merged in a change that will stop splitting the window to show notes - it will just open it up in the current window. This seems like the right thing to do, AFAICT. For example, M-x info works like this. That should solve this issue, but perhaps after using it like this, I may have second thoughts and I'll try the other way. Let's see!

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

Successfully merging a pull request may close this issue.

2 participants