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

ZettelSearch and insert mode #128

Open
rcmosher opened this issue Jul 22, 2022 · 1 comment
Open

ZettelSearch and insert mode #128

rcmosher opened this issue Jul 22, 2022 · 1 comment

Comments

@rcmosher
Copy link

ZettelSearch doesn't handle remaining in insert mode well.
First, if it's run from a mode other than insert mode, it still goes in to insert mode afterward.
Second, at least in markdown format, the cursor ends up inside the link instead of after it. E.g. [LinkedZettel](123456-123456-12<cursor>)

For the first it would be nice to have an option which could be used for normal mode mappings to not enter insert mode after ZettelSearch

For the second, the last line of zettel#fzf#wiki_search could be call feedkeys("ea", "n"). Though I don't know if that would break other formats.

@rcmosher
Copy link
Author

My suggestion for placing the cursor outside the link is bad. And it looks like it may not be necessary. I upgraded to Vim 9 and the issue seems to have gone away.

I discovered this while starting a pull request. It may still be worth considering since it removes some extraneous characters and logic. But I decided to pause on it after being surprised by the issue going away for me.
Changes in my branch

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

No branches or pull requests

1 participant