orgmode icon indicating copy to clipboard operation
orgmode copied to clipboard

Some Vimmy Enhancements

Open aareman opened this issue 3 years ago • 2 comments

Does this feature exist in Emacs orgmode core?

N/A

Orgmode link

No response

Feature value

I left out the regular questions in this issue since its not relevant to orgmode or emacs behavior. Rather its some behavior tweaks that could be made to make this outstanding plugin feel more integrated into vim.

  1. . command should remember the prompt value. (so if I run <leader>ot to edit the tags, and then I go to another headline and press . it should edit the tags the same way instead of running the edit tags command and bringing up the prompt of what I would like to change the tags to. If I wanted to change them to something other than my original edit, then I would run <leader>ot again.
  2. Org agenda/task lists should be treated as a normal buffer. So that if I press enter on an agenda item and it opens it in the same window, pressing <c-o> should bring me back to the agenda. Currently it does, but then the buffer is empty.
  3. User prompts, share same history (refile headline, filter tags/categories, etc...) all share the same history, which makes it harder to reuse previous values. For example, if I'm in the agenda and I have a complex filter active. Then I do a bunch of org editing, and reopen the agenda, when I type / and then scrollback through the history to restore my filter, I may have to scroll a bunch of items back which is not intuitive.

These are some ideas that I came across that would make orgmode a little more vimmy.

Again, thank you @kristijanhusak for the amazing work!


Aside, is there a lua way to open the agenda with a filter pre-applied?

Additional context

No response

aareman avatar Apr 06 '22 14:04 aareman

Hi @aareman , very nice suggestions. Here's my feedback on these:

  1. Currently there is integration with vim-repeat to support repeating the last mapping. In your example, . would re-show the prompt, because that's the last mapping you triggered. If we would implement something like this, I'd have it as a separate mapping, because having . would most likely break something with vim-repeat integration.
  2. I think this could be solved by saving each agenda view in a tmp file. Currently agenda view opens a blank non listed buffer, which is gone once you leave it. I'm not sure if that would work, but it's worth a try.
  3. I'm not sure if there is a way to have specific history per command. If you know any sources around this, please send them over.

Aside, is there a lua way to open the agenda with a filter pre-applied?

Not at the moment, but it could be introduced.

kristijanhusak avatar Apr 06 '22 15:04 kristijanhusak

Thank you. Sorry for the late reply. I think point 2 would work. One thing to watch out for would be if there are too many agendas. Maybe it would be better to reuse the same agenda view and keep track of "current agenda state".

aareman avatar Aug 17 '22 13:08 aareman