Comments (11)
from wiki.vim.
This plugin is actually quite nice!
Thanks!
I personally don't need any such system of organization. The reason is simply that I generally keep track of everything manually. That said, I'm not against adding such a system. But if we do, then I think it should be well thought through. In the sense that it will add value that is not easily brought from other tools.
As an example: If I want to find notes related to a particular topic, I use one of the following methods:
- ctrlsf: A very good Vim plugin for searching. I use it with ripgrep as a backend, which makes it very fast. This way I can find almost anything worth finding very quickly.
- CtrlP: I've added
:CtrlPWiki
as a command in the plugin, which relies on CltrP (of course). It makes it easy to search and open notes by name.
So, say we added a tag system that allows one to add tags to notes. We would need to do several things:
- Specify a tag syntax (or more than one); it should be "compatible" to the filetype one wants to use.
- Decide if the tags should be specific to a particular note (i.e. file), or if it can be local to a section of a note. If the latter, it should be clearly justified.
- Add functionality that utilizes the tags. Would we need more than the possibility to list all notes that contain a given tag? If so, what?
Before I implement anything, I want to finish this discussion and to clearly specify how it should work. Preferably, I should be able to write the documentation and some tests before I implement. That way I will waste less time redoing things after the initial implementation.
from wiki.vim.
Thanks for your reply. I'll dump my ideas here 😉
As an example: If I want to find notes related to a particular topic, I use one of the following methods
Yes that is possible, but I think the point of having wiki.vim is to add some comfort to this. It would be possible to maintain a wiki completely without this plugin in pure vim, but that is not what I want 😄
My usecase would probably be solved by something like a combination of the behaviour of WikiGraphFindBacklinks
function and the WikiPageToc
.
Let's say, I add something like [[Tag:ProjA]]
to a file (which is apparently not supportet at the moment).
Then in my overview page i could call something like :WikiGraphFindTag ProjA
which has behaviour like WikiPageToc i.e. it can create or update a sorted list of the results.
- Specify a tag syntax (or more than one); it should be "compatible" to the filetype one wants to use.
What about [[Tag:mytag]]
? Does this collide with something? I don't have a full overview about the link syntax yet. But this would allow to create a "special meaning text object" with the already existing and very comfortable method of pressing enter.
It could also create a tag page (maybe in a seperate folder) with a backlink to the current wiki page.
But it doesn't have to be solved with a link.
- Decide if the tags should be specific to a particular note (i.e. file), or if it can be local to a section of a note. If the latter, it should be clearly justified.
I'd say file specific. If I'm thinking about something like Wikipedia, you have links which can point to pages and sections, which is already possible in wiki.vim. But you also have "Categories" for a page which will automatically add the page to the category's page.
- Name: I'd rather go for Tag instead of "Category" because it is faster to type and more clear that a page can have multiple tags. (Some systems only allow one category for one kind of thing).
- Automatically update: Might by comfortable, but I don't know if this is "vim spirit". But having a command for manually updating a tag collection would be great.
- Add functionality that utilizes the tags. Would we need more than the possibility to list all notes that contain a given tag? If so, what?
For my usecase that is enough, but maybe some plugins which generate websites from a vim wiki could utilize it/already have such a feature
Before I implement anything, I want to finish this discussion and to clearly specify how it should work. Preferably, I should be able to write the documentation and some tests before I implement. That way I will waste less time redoing things after the initial implementation.
👍
It would be great to hear other ideas!
from wiki.vim.
Yes that is possible, but I think the point of having wiki.vim is to add some comfort to this. It would be possible to maintain a wiki completely without this plugin in pure vim, but that is not what I want smile
Agreed (and good point).
It seems to me that the tag feature of Vimwiki [0, 1] is close to what you want. And due to the already close relationship, it seems sensible to make something similar to this.
For a first implementation, I propose the following:
- Syntax:
:tag-one:tag-two:...:
. Tags can not contain spaces. This is the same as the Vimwiki syntax. - Tags are file specific. If desired, we may consider to expand on it later. This differs from Vimwiki, where tags may also be section specific. If we could restrict the tags to eiher be at the top and/or the bottom of a wiki page/file, then searching would probably be very fast.
:WikiTagSearch
- a command that searches for the specified tag. I think it should allow:WikiTagSearch -output=<arg>
, where<arg>
can be specified to direct the output to e.g.- location list (default)
- below the cursor
- scratch buffer
- simple echo
The function would basically first collect a list of the matching wiki pages, then it would output the list at the desired location.
- Possibly: If searching for tags turns out to be slow, then we could consider to implement a tag cache.
I'll refine this list with the continued discussion, and when we agree I'll begin implementing.
from wiki.vim.
I agree with all points.
I'd suggest to add an alias function WikiTagInsertList
which is basically the same as WikiTagSearch -output=cursor
.
The latter is a long command and might scare beginners (like me 😄) but I like the Idea of beeing able to search for the Tags. It'd be great if that function would update a current tag list, if exists (like the TOC).
from wiki.vim.
I've begun to work on this now. It is not fully functional, but the ideas are progressing.
from wiki.vim.
Now it is getting closer to ready, and I'd be happy to get some feedback.
from wiki.vim.
@kwrobert I don't mind considering something like that, but I think it is smart to polish the initial version of this feature first. So, please open a new issue with this suggestion, then we can further discuss it there and I can consider to implement it later.
from wiki.vim.
I think the current implementation now covers the basics. It would be convenient if further enhancement requests are described in separate issues. Feel free to give general feedback and/or notice of bugs related to the "basic" mechanisms here. In the meantime, I'll take the liberty of closing this issue.
from wiki.vim.
I just want to drop a note here that I am plotting a markdown macro-expansion preprocessor that can output link lists matching a query string. Haven't decided on a final syntax but I think the POC will expand
## My List | linksTo:somePage
appending
* [Each](Each.md)
* [Match](Match.md)
The idea being that you could have it run on editor focus/save to update. Inspired by TiddlyWiki macros and https://github.com/tbabej/taskwiki.
POC # 2 might be to automatically append a backlinks list to each file if there are backlinks.
from wiki.vim.
@edrex Thanks. If you want to collaborate, e.g. couple what you are doing with wiki.vim, then feel free to open a new issue for a full discussion.
from wiki.vim.
Related Issues (20)
- Link processing is broken with changes from 2023-05-09 HOT 4
- Cannot get completion to work HOT 11
- Custom motion keymap for Colemak (i) clashes with default wiki.vim keymaps HOT 9
- Toggling links with `gl` doesn't correctly display the "choose UI" HOT 7
- Feature request: Check for orphaned wiki files HOT 4
- Allow link completion for multiple file types HOT 2
- Feature request: mark a header that has a backlink coming from another page HOT 11
- how to attach marksman lsp to wiki index.md properly HOT 3
- <cr> creating nested links that are not required HOT 5
- Option to disable popups for ui#input HOT 4
- [Discussion]: Dropping support for vim HOT 13
- [Bug] :WikiJournalCopyToNext is not working HOT 2
- new error message at startup "E715: Dictionary required" HOT 10
- Error when invoking WikiGraphCheckOrphans HOT 1
- wrong TOC level HOT 15
- automatic production of backlink does not work. HOT 4
- Feature. Create link with a relative path and a header in markdown HOT 3
- `wiki#link#get_creator` having issues retrieving `l:ft` from `g:wiki_link_creation` despite `l:ft` existing in the list. HOT 5
- LazyVim setup HOT 6
- wiki_template is duplicated HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wiki.vim.