版本发布 5
Time flies; I'm finally releasing a new version! There's a steady flow of improvements. In this release, I think the main highlight is that wiki.vim now handles links in Markdown files in a more natural manner. For instance, it applies URL decoding of markdown links. ### Features * Links * **[breaking]** Add new default `md` scheme for Markdown (#383) * Uses URL decoding while resolving link URLs. * Applies URL encoding for parantheses. * The `vimdoc` handler now properly supports all `<plug>(wiki-link-follow*)` maps (#364) * Add `:WikiLinkRemove` with default map `<leader>wlr` (#224) * Add visual mode version of `<plug>(wiki-add-link)` (#369) * Add ability to follow anchors to heading-id (#381) * Remove enclosing angled brackets while resolving URLs (#386) * API * Add `wiki#graph#get_broken_links()` * **[breaking]** Rename `wiki#graph#get_broken_links` to `wiki#graph#get_number_of_broken_links` * Use caching for `wiki#graph#get_number_of_broken_links` to improve performance * UI * **[breaking]** Add banged version (see `:help :command-bang`) for the global commands `:WikiIndex`, `:WikiJournal`, `:WikiPages`, and `:WikiTags` (#387) * With a bang (e.g. `:WikiIndex!`), the command behaves as before: It first goes to the index of the currently opened wiki. If no current wiki is detected, it falls back to index for the globally defined wiki (specified by `g:wiki_root`). * Without a bang (e.g. `:WikiIndex`), the command _always_ goes to the globally defined wiki. * Add command completion to `:WikiOpen` (#372) * Add support for more "accept keys" for fzf version of `:WikiPages` (#391) * Other * Allow to reverse order of journal index with `reverse` key for `g:wiki_journal_index` (#363) * Add option `g:wiki_mappings_prefix` to allow to change the default mapping prefix (#362) * **[breaking]** Improve fzf select methods (#376, #378) * This brings a minor breaking change: The option `g:wiki_fzf_pages_force_create_key` was renamed to `g:wiki_fzf_force_create_key,` since it is now also used for `wiki#fzf#links()`. * Several improvements to the docs (#355, #357, #358, #359, #360, #361, #365, #369, #370, #371, #382, #384, #389, #393) ### Bug Fixes * Links * Fix insert mode version `<plug>(wiki-add-link)` with fzf (#369) * Fix minor issue with the `man` scheme resolver * Fix an issue with `wiki#fzf#links` for vim in visual mode (#369) * Other * Fix an error with graph cache invalidation (#348) * Ensure we use a fast cache refresh for `wiki#graph#find_backlinks()` (#374) * Wrap shellescape for better Windows support (#351) * Use proper string parsing to avoid an infinite loop situation (#367) * Avoid `:` as separator in fzf functions due to windows file paths (#365) * Properly set default viewer on windows * Fix a bug in relative link updates on `:WikiPageRename` (#385) * Ensure telescope selector for tags has the path value (#365) * Avoid using `iconv` while URL encoding/decoding as it doesn't work properly on all systems (#395) * Various fixes for minor, small, and some silly bugs (e.g. #388) ### Acknowledgements There have been several contributions from the community; thanks! 🤩 As before, I would like to give a special thanks to everyone who contributes with PRs: @qadzek (#355, #357, #358, #359, #384, #393), @A-dot-S-dot (#371, #376, #377, #378), @sonjiku (#381), @matthew-brett (#382), and @rvmtz (#388).
It's been way too long since I made a release. Still, there has been a lot of improvements and updates. The main highlights of this update are: * The `g:wiki_select_method` has become much more powerful. * Added `WikiLinkIncomingToggle` and `WikiLinkIncomingHover`. * Added `WikiLinkAdd`. **Important**: This is the _final_ release of wiki.vim that supports older Vim and neovim versions. Starting now, I will bump the version requirements to Vim 9.1 and Neovim 0.9.5. I am aware that these are very recent versions, but I want to have that flexibility. Users who for some reason need to or want to use older version should stay on the `v0.9` tag. ### Features * UI * Added `:WikiLinkAdd` with corresponding mapping and API method (#329) * Added `g:wiki_ui_method` for choosing ui backends (#317) * [**breaking**] Generalized `g:wiki_select_method` * This allows custom backends for `Wiki{Pages,Tags,Toc}` * This adds support for Telescope as a select method * See `:help wiki-advanced-config-3` for an example on how to customize the select method with `fzf-lua`. * Link graph * Added incoming links functionality (#313) * `:help WikiLinkIncomingToggle` * `:help WikiLinkIncomingHover` * Change default depth for `WikiGraph{In,Out}` * API changes * [**breaking**] Renamed `Wiki#toc#get_section_at` to `wiki#toc#get_section` * Improved `wiki#toc#gather_entries` * Improve filetype specifications for `wiki#toc#...` (#346) * Skip fenced code blocks in `wiki#link#get_all_from_lines` * Other * Added initial support for BibDesk links (#341) * Added the activated link to the template context (#342) * `:help wiki-templates-context` ### Bug Fixes * Wrapped `fd` path in quotes to handle spaces in the path (#336) * Improved formatted `echo`s * Ensure folds are disabled in popups * Fixed regression in `wiki#graph#check_orphans` (#322) * Removed empty anchors from urls (#323) * Only remove first toc entry if it makes sense * Fixed bug with handling windows paths in `wiki#paths#relative` (#340) ### Acknowledgements I would like to give a special thanks to @camfowler who contributed with the PR #336.
This is a significant update that brings several breaking changes! I'm quite proud of the updates and I believe they both very much improves wiki.vim as a plugin for users, and also makes it easier to continue future maintenance and improvement. Also, wiki.vim is no longer considered "simple". That is, the slogan _A simple wiki plugin for Vim_ is now _A wiki plugin for Vim_. :rocket: ### Features * **Breaking changes** * Added new option `g:wiki_link_creation` (#296, #299) This option provides a more flexible filetype dependent behaviour. It also deprecates four other options and thus makes configuring wiki.vim easier for most people. And since the new option provides sensible defaults, it also means most people will require less customization. The following options are deprecated: * `g:wiki_map_text_to_link` * `g:wiki_map_create_page` * `g:wiki_link_extension` * `g:wiki_link_target_type` * Changed the word _toggle_ to _transform_, e.g. `<plug>(wiki-link-toggle)` is now `<plug>(wiki-link-transform)`. The word "toggle" is not a good word for the act of changing a link from one type to another. Transform may not be perfect, but at least it is much better. This changes two options: * `g:wiki_link_toggles` → `g:wiki_link_transforms` * `g:wiki_link_toggle_on_follow` → `g:wiki_link_transform_on_follow` * Changed default of `g:wiki_write_on_nav` to 1 * Refactored significant parts of the code. These are mostly hygienic changes that makes it easier to continue development and perform other improvements. But I believe they make things simpler to reason about. Highlights: * Changed how URL handlers/resolvers are implemented (#302, #304) The old style was somewhat convoluted in that the URLs were unnecessarily entwined with the link concept. The new implementation more properly separates the concepts. This is a major step towards allowing more flexibility for users to define their own URL resolvers and handlers. In the process, the `g:wiki_resolver` and `g:wiki_file_handler` options were removed! The new option `g:wiki_link_schemes` replaces both of these. Also, `g:wiki_month_names` was renamed to `g:wiki_template_month_names`. The documentation has also been revised and there are a couple of advanced configuration examples that should be helpful for users who want to customize things. * The concept of a "link matcher" is changed to "link definition" and the matcher is converted to a "pure" function. All link definitions are gather in `autoload/wiki/link/def.vim`. * All link templates (for inserting a link) are gathered in the corresponding `autoload/wiki/link/template.vim`. * The link templates must now accept three arguments, the third argument is the origin link itself. This allows to use templates in a more functional way and makes the data flow clearer. **Note**: This means that anyone who used their own `g:wiki_link_transforms` functions will need to adjust them to accept the third argument. * Added new option `g:wiki_link_default_schemes` (#301, #303) This allows a flexible way to specify default schemes for each link, per filetype if desired. * Added Neovim-specific UI elements with a floating window popup for `input`, `confirm` and `select` actions. * Added visual mode version of `:WikiLinkExtractHeader` (#280) * Added `:WikiGraphCheckOrphans` (#311) * Added `wiki#buffer#refresh_incoming_links` (#313) * Use scratch buffer to show link data (#301) * Other minor things: * Changed name `wiki#complete#link` → `wiki#complete#url` * Allow argument for `:WikiOpen` * Added `wiki#link#get_all_from_range` * Added `wiki#graph#get_backlinks_enriched` * Added `:wiki#u#associate_by` ### Performance * Improve performance of `wiki#graph#check_orphans` * Improve graph `cache_links_in` refresh mechanism ### Bug Fixes * Use `fd -I` to respect `.gitignore` for completion (#307) * Complete links for all chosen filetypes (#312) * Ensure the `cache_links_in` graph is properly read before refreshing the graph data * Use `inputlist()` for `ui#select` when buffered * Use `silent!` to ignore potential errors in `url#follow` * A few other minor fixes ### Documentation * Large improvements to the documentation * Improved descriptions of links and urls (#301) * Improved the structure and flow of sections * Added some advanced configuration examples * Fixed typo in example (#314) ### Acknowledgements As always, I much appreciate contribution from the community, and I would like to thank in particular those who contributed PRs: @jiz40h (#314).
I'm planning some relatively large changes in future work, see e.g. #296, #297, #301, and #302. I believe these will be very good changes that will allow much more user flexibility and keep wiki.vim more filetype agnostic than before. However, since these are major updates, I believe it is useful to make a small release now that allows users to pin their local versions to a stable release. I would not be surprised if I push some bugs while developing, so pinning to this release may give a more stable experience for those who don't want to be surprised. ### Features * *Breaking change:* Use absolute paths for `journal.link_*_parser` * Add support for separate root directory for the journal (#273) * Generalize the TOC feature (#295, #288) * Allow "edit in vim" for file handler, see `:help g:wiki_viewer` * Use modern jobs backends for Zotero viewer ### Documentation * Added a comment about JabRef integration (#286) * Removed broken ToC link in README (#293) ### Acknowledgements As before I would like to give a special thanks to those who contributes with PRs: @BeTmAsTeR (#293) and @saccarosium (#295).
It's time for a new release. This release brings a few important updates, including one *important* breaking change (see #289): The default filetype is now Markdown, instead of the previous `.wiki`. This should be more aligned with user expectations and I believe it would reduce the required configuration for most users. Notice that those who use the `wiki` filetype and want to still do that now likely need to apply some configuration, e.g.: ```vim let g:wiki_filetypes = ['wiki'] let g:wiki_link_target_type = 'wiki' let g:wiki_link_extension = '' ``` ### Features * *Breaking changes*! * Changed default filetype to Markdown (#289) * Added `g:wiki_journal_index` option (#260) * The option `g:wiki_journal.index_use_journal_scheme` is moved into `g:wiki_journal_index.use_journal_scheme`. * `g:wiki_journal_index.use_journal_scheme` is deprecated in favor of `g:wiki_journal_index.link_url_parser`. * Unified the "search" commands `WikiPages`, `WikiTags`, and `WikiToc` and thereby deprecated `WikiFzf*` variants. * Removed support for CtrlP (`:CtrlPWiki`) and for Unite and Denite * I don't want to keep support for these interfaces. I instead want to provide an API that makes it easy to build such interfaces on top for those who are interested. * Added support for neovim's `vim.ui.select` (#281, #282) * Add configuration option `g:wiki_select_method` for `Wiki{Pages,Tags,Toc}` * Added `g:wiki_journal_index.link_text_parser` and `g:wiki_journal_index.link_url_parser` (#260) * This adds a flexible way to specify how `:WikiJournalIndex` should determine the link text and url of the recognized links. * Added `g:wiki_fzf_tags_opts` (#157, #269) * Allows to pass additional options to Fzf in `:WikiTags` (with Fzf backend). This is useful e.g. to add a previewer. * Allowed to disable specified mappings with the `g:wiki_mappings_...` options (#159) * Implemented a less strict reference url detector (#275) * Allowed `.` inside shortcites (https://github.com/lervag/wiki-ft.vim/issues/13) ### Bug Fixes * Ensure `g:wiki_cache_root` is expanded before use (#261) * Properly initialize `:WikiClearCache` command * Avoid looking for missing keys in cache * Some minor bugs and issues (#264) * Recognize links also when line starts with inline code (#267) * Only navigate to existing nodes with `WikiJournal{Next,Prev}` (#266) * Rely on journal interface for weekly template * Force case sensitive regexes where necessary (#272) * Fix issue with `:WikiTagRename` (#285) ### Documentation * Clarified `g:wiki_root` example (#261) * Extend `:help wiki-intro-guide` with a section about the journal (#270) * Several minor improvements (#265, #268, #271, #281) ### Acknowledgements Again there has been several contributions from the community, and as before I would like to give a special thanks to everyone who contributes with PRs: @step- (#268, #269), @mizhozan (#271), @cwolfe3 (#277), @saccarosium (#281), and @trev-dev (#285).