A wiki plugin for Vim
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:
g:wiki_select_method
has become much more powerful.WikiLinkIncomingToggle
and WikiLinkIncomingHover
.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.
:WikiLinkAdd
with corresponding mapping and API method (#329)g:wiki_ui_method
for choosing ui backends (#317)g:wiki_select_method
Wiki{Pages,Tags,Toc}
:help wiki-advanced-config-3
for an example on how to customize the
select method with fzf-lua
.:help WikiLinkIncomingToggle
:help WikiLinkIncomingHover
WikiGraph{In,Out}
Wiki#toc#get_section_at
to wiki#toc#get_section
wiki#toc#gather_entries
wiki#toc#...
(#346)wiki#link#get_all_from_lines
:help wiki-templates-context
fd
path in quotes to handle spaces in the path (#336)echo
swiki#graph#check_orphans
(#322)wiki#paths#relative
(#340)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. I've tried to highlight the most important changes below, but the gist, in short:
g:wiki_link_creation
g:wiki_link_schemes
g:wiki_link_default_schemes
input
, confirm
or select
stuff.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:
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.
g:wiki_link_default_schemes
(#301, #303)input
, confirm
and select
actions.:WikiLinkExtractHeader
(#280):WikiGraphCheckOrphans
(#311)wiki#buffer#refresh_incoming_links
(#313)wiki#complete#link
→ wiki#complete#url
:WikiOpen
wiki#link#get_all_from_range
wiki#graph#get_backlinks_enriched
:wiki#u#associate_by
wiki#graph#check_orphans
cache_links_in
refresh mechanismfd -I
to respect .gitignore
for completion (#307)cache_links_in
graph is properly read before refreshing the graph datainputlist()
for ui#select
when bufferedsilent!
to ignore potential errors in url#follow
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.
journal.link_*_parser
:help g:wiki_viewer
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.:
let g:wiki_filetypes = ['wiki']
let g:wiki_link_target_type = 'wiki'
let g:wiki_link_extension = ''
g:wiki_journal_index
option (#260)
g:wiki_journal.index_use_journal_scheme
is deprecated!WikiPages
, WikiTags
, and WikiToc
and thereby deprecated WikiFzf*
variants.:CtrlPWiki
) and for Unite and Denite
vim.ui.select
(#281, #282)
g:wiki_select_method
for Wiki{Pages,Tags,Toc}
g:wiki_journal_index.link_text_parser
and g:wiki_journal_index.link_url_parser
(#260)
:WikiJournalIndex
should determine the link text and url of the recognized links.g:wiki_fzf_tags_opts
(#157, #269)
:WikiTags
(with Fzf backend). This is useful e.g. to add a previewer.g:wiki_mappings_...
options (#159).
inside shortcites (https://github.com/lervag/wiki-ft.vim/issues/13)g:wiki_cache_root
is expanded before use (#261):WikiClearCache
commandWikiJournal{Next,Prev}
(#266):WikiTagRename
(#285)g:wiki_root
example (#261):help wiki-intro-guide
with a section about the journal (#270)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).
It's been way too long since the last release, so here's a new one. It brings a lot of changes, both minor and major. I've tried to summarize things somewhat:
:WikiGraph*
Graph commands in general:WikiGraphRelated
: Command to show related pagesuname
call (#195)g:wiki_journal.index_use_journal_scheme
(#206)netrw#BrowseX
as generic url handler (#214):WikiLinkFollowSplit
(#223):WikiLinkFollowTab
(#204)<f2>
for rename section:help WikiLinkToggle
for improved docs.#url#wiki.follow
(#166)g:wiki_viewer._
as fallback for file scheme (#171):WikiJournalIndex
respect wiki_link_extension (#219)strptime
implementation for windows (#252)g:wiki_viewer
There has been several contributions from the community. I would like to give a special thanks to everyone who contributes with PRs: @anjiro (#168, #172, #180, #186, #193, #196, #197, #201), @digital-carver (#169), @savq (#174), @Ginner (#182, #185), @jeffmm (#192), @MosaicMan (#198), @endter (#204), @agorf (#210, #211), @aignas (#173, #216), @jgilchrist (#221), @troiganto (#247, #248), @Alanxyz (#259).
This is a small release, but it brings a breaking change: The list functionality is now separated from wiki.vim into its own plugin, lists.vim. This change is warranted, as wiki.vim is meant to handle links, not lists. For more info, see the discussion in #131.
After updating to this release, please consider to add the lists.vim
plugin if those features were useful for you.
This is a minor release with a few improvements, changes, and fixes:
Features
&shellescape
issues (#151, #153, #156, #158):WikiFzfPages
through g:wiki_fzf_pages_opts
(#157):WikiLinkExctractHeader
<plug>(wiki-link-extract-header)
(by default <leader>wlh
)Fixes
:WikiFzfPages
(#155)wiki#list#move
)Other
Thank you to everyone who has contributed with issues/bug reports/feature suggestions!
It's time for a new release. There's been a lot of changes, mostly minor fixes, rebasing, maintenance, and improvements to the docs. Some of the more significant updates:
g:wiki_file_open
to g:wiki_file_handler
WikiLinkOpened
to WikiLinkFollowed
:WikiGraphCheckLinks
(#145):WikiListMove(Up|Down)
WikiBufferInitialized
g:wiki_global_load
to allow to disable loading wiki.vim outside the g:wiki_root
specified wiki (#132)g:wiki_link_toggles
to allow custom toggles (#72)g:wiki_resolver
, allows to override the wiki page resolver (#148)coc.nvim
:WikiFzfPages
- e.g. allow to create new notes (#133, #143):WikiPageRename
- it now supports new directories (#108)g:wiki_root
- more consistent (#78)There were ~200 commits, so there's a lot more updates since v0.1. Thank you to everyone who has contributed!
I'll aim to make the releases more frequent in the future, so that I can better describe all the important changes.
This is the first release of wiki.vim. The current version should generally work well. In the future, breaking changes and major updates will lead to new releases.