Skip to content

Improve fzf select#376

Merged
lervag merged 3 commits intolervag:masterfrom
A-dot-S-dot:improve-fzf-select
Aug 20, 2024
Merged

Improve fzf select#376
lervag merged 3 commits intolervag:masterfrom
A-dot-S-dot:improve-fzf-select

Conversation

@A-dot-S-dot
Copy link
Copy Markdown

Dear @lervag,
I suggest three improvements for wiki#fzf#link which also fixes a bug. I combined them in one pull request, because they depend on each other.

  1. The first commit removes / in the beginning of every search query in wiki#fzf#pages and wiki#fzf#links.
  2. Unfortunately in the current state wiki#fzf#link does not work for new links, since the mode variable is incapsulated in existing pages. The second commit fixes this issue.
  3. The last commit adds a force key for wiki#fzf#link similar to the one of wiki#fzf#pages. It is worth mentioning that I changed g:wiki_fzf_pages_force_create_key to g:wiki_fzf_force_create_key to make it usable for both mentioned selecting methods.

Best regards

A-dot-S-dot added 3 commits August 19, 2024 16:09
I removed `g:wiki_fzf_pages_force_create_key` and replaced it by
`g:wiki_fzf_force_create_key` that is used as well as for
`wiki#fzf#pages` as for `wiki#fzf#links`.
@lervag
Copy link
Copy Markdown
Owner

lervag commented Aug 20, 2024

  1. The first commit removes / in the beginning of every search query in wiki#fzf#pages and wiki#fzf#links.

Ok; this is for the displayed field that you are searching in, right? The reason it was there is to make it clear that the page is "rooted". But I'm not sure if that's really necessary.

  1. Unfortunately in the current state wiki#fzf#link does not work for new links, since the mode variable is incapsulated in existing pages. The second commit fixes this issue.

Ok, thanks!

  1. The last commit adds a force key for wiki#fzf#link similar to the one of wiki#fzf#pages. It is worth mentioning that I changed g:wiki_fzf_pages_force_create_key to g:wiki_fzf_force_create_key to make it usable for both mentioned selecting methods.

Sounds useful, thanks!

I'll look at the code now and will probably merge this immediately.

lervag added a commit that referenced this pull request Aug 20, 2024
This brings a minor breaking change: The option
g:wiki_fzf_pages_force_create_key is renamed to
g:wiki_fzf_force_create_key, since it is now also used for
wiki#fzf#links.

refer: #376
@lervag lervag merged commit 551e7b1 into lervag:master Aug 20, 2024
@A-dot-S-dot A-dot-S-dot deleted the improve-fzf-select branch August 21, 2024 07:06
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 this pull request may close these issues.

2 participants