Hacker News new | past | comments | ask | show | jobs | submit login
Personal Wiki for Vim (github.com/vimwiki)
204 points by vincent_s on June 4, 2020 | hide | past | favorite | 80 comments



With wikis or note taking applications, I always find it hard to get into a habit of using them. I think this is largely because too much brain space is taken up with:

    1. When should I write something here?
    2. How should I organize it?
For this reason, I'm currently trying out more of a "journal" model. The answers to the previous two questions are:

    1. Write whenever you have an interesting idea, or you get that
       feeling that something important is about to get evicted from
       your brain cache.
    2. Every note goes in YYYY-MM-DD.md on the day you make the note.
       You can add #tags to entries to track your thinking or progress
       on a particular topic over time.
I've just started this, so we'll see how it turns out. But I'm optimistic.


Ugh man I love vim but now I have to be the one to bring it up: this is exactly why org-capture is so useful. Jotting down quick notes / tasks / todos and being able to customize exactly how these get filed or templated is exactly why org-capture exists.

That said after locking myself into Spacemacs to use org-mode and org-capture, I always wish there was a way to make org a bit more independent of Emacs, or at least a bit more collaborative. We use Asana at work for tasks / issues / todos and syncing that between my TODO.org and back again can be tiresome when trying to preserve information and context. I'm definitely better at maintaining my org files, but Asana preserves context in a more clean way because people can collaborate and add information to tickets, whereas they can't do that with org files.


This is a very relevant comment! I think it is very important to lower the barrier between a thought and a note. I personally do this by having a shortcut on my keyboard that immediately opens my index/"scratchpad", which means I'm always ~0.1 seconds from writing down a thought. If I know exactly in which context it belongs, I'll use an fzf backed shortcut to very quickly find the relevant note (e.g. for Python notes I add it to my WIKIPATH/python.wiki).

I actually recommend against putting everything in a diary, because I want my notes regarding a topic to be collected in the same place.


I started a while ago now with that, I just wrote a bunch of things into a file as a time line, and it slowly got more and more useful. Then I found I had a bunch of info around various topics scattered through the journal, so I started making topic guides. My topic guides are super useful now. I maintain and add them much more than the journal. So, to my point, I think recording things is useful, but it's best done in an organic way, where you just try things and adapt what you do based on how you are finding it. The only other thing I'd say is it is actually much nicer, in my experience, just using files (backed up by your favorite drive syncing software) and no specific tools. I also use markdown, but doesn't really matter.


In the past I have done this with Evernote, making a new note each day. Not too different except then I can access/edit the notes on mobile and search them easily. It can be helpful when done daily (even as a reference). Saying that, I enjoy vim so must take a closer look at vim wiki.


this is a good strategy. i use it too.

vimwiki allows for maintaining a "journal" through diary mode: it automatically creates diary entries with whatever file-naming scheme you want, organizes a diary index page (table of contents), etc.


Gonna start doing this but with a single big text file, synced and linked to everywhere convenient. I figure one file will keep it tidier if I'm going to be doing grep to parse and sometimes appending other things to it.


I want to put in a good word for zim-wiki here. Its a shame the Windows port seems to be on indefinite hiatus for now. Its by far the easiest GUI-based wiki to deal with, easily handles just dropping in files into a hierarchy and simply working with them after a refresh. Sorry but being able to use a mouse to navigate a wiki beats out a keyboard-based wiki any time.

https://zim-wiki.org/


Have you tried one that's controlled by keyboard? I haven't used Vim since I think rich text formats provide more value, but I like to control as much as possible by keyboard if possible. There are certain applications where you really need a mouse (like image editing), but I feel like the keyboard is under appreciated.

I've been working on the new user interface for Emvi [1] for the past three months or so and once you have build the muscle memory, you can use it blindly. You can read about it here [2] if you like and find current screenshots/gifs on Twitter [3].

One thing that might have turned people away from learning keyboard controls is that they get overwhelmed by a ton of different shortcuts. We (hopefully) solved this issue by using commands (words) you can type out instead of remembering two or more keys.

[1] https://emvi.com/

[2] https://emvi.com/blog/a-new-experimental-user-interface-QMZg...

[3] https://twitter.com/emvi


I just started a project to get 0.70 running for windows on my own machine. If I’m successful, I will share with the community.


I'd love to help out but my programming experience is limited. Use zim-wiki all the time on both Linux and Windows. It's one of the best note taking programs out there.


I used Zim-wiki for years, and loved it. However, there is a fatal flaw in Zim that people using it for notes about code should know about. Zim parses all text as "wiki text" and some computer code snippets get parsed and interpreted as formatting. See this bug: https://bugs.launchpad.net/zim/+bug/585300

Other than that issue, Zim is brilliant. The developer is very responsive to most issues and feature requests. Sadly, Zim wasn't for me as many of my notes involve code.


You can format code as "Verbatim" (Ctrl+T), and it will not be interpreted as wiki text.


Want to clarify for the OP that there is still a Windows port available and it is feature complete. The new 0.7 line is the one where more work is required to build an installer.


I used WikidPad (https://en.wikipedia.org/wiki/WikidPad) for a while and quite liked. It looks somewhat similar to zim-wiki. Unfortunately it does not look like it is under active development. Whats good about: 1) cross platform 2) entries are plain text files 3) scriptable/extendable with python


Zim has its good points, but the biggest problem I have with it is the inability to wrap lines shorter than the full monitor width. On a 13" laptop, it's usable; on a widescreen desktop monitor it just doesn't work. Other wikis like tiddlywiki, pmwiki, and dokuwiki are able to avoid this.


Certainly not had that problem myself but one of the reasons I use zim-wiki is because it supports displaying embedded pictures which for certain things is very useful.


Sorry if I misunderstood, but does changing the window size solves the problem? I never maximize it, so I was not aware.


I could shrink the window, but that's definitely not an optimal solution. It also means that I lose much of my screen width. That creates its own problems.

Here's a bug someone filed that hasn't even so much as gotten a response after nearly eight months:

https://github.com/zim-desktop-wiki/zim-desktop-wiki/issues/...


Used zim as well really liked the simplicity of it, but later on, discovered org-mode and switched to it.


I adopted vim-wiki a little while ago and have really appreciated its functionality. I like that all files are plain text and located in a single folder. It is easy to reach from anywhere in vim, providing simple means to quickly make a note of todo/diary items during work.

Also, I greatly enjoy that it allows for making local references in between your wiki files. A simple link towards another wiki- or diary-entry allows you to jump to that note. It is not only nice for navigation, but also to explore connections between your thoughts. To understand those connections better, I create a simple script (vimwikigraph [0]) to draw these connections using the DOT language [1].

In that way it is similar to Roam [2] I think, although I have not used it myself.

[0] https://github.com/maxvdkolk/vimwikigraph

[1] https://graphviz.gitlab.io/_pages/doc/info/lang.html

[2] https://roamresearch.com/


Can you describe what you think vimwiki adds over a bunch of markdown files and `gf` for links?


For me it was just structure and ease of use. You can configure vim to make files on specific keypresses to link your diy wiki together, use gf like you mentioned to jump around, make your own auto folding and stuff...

Or you can be lazy and install a plugin that takes thirty seconds to get the hang of.

Actually writing and staying organized has been challenging due to the fact I don't focus well. Spending time recreating vimwiki is time not spent staying organized. Vimwiki has low friction so I use it.


I like the ease of use and I greatly enjoy its diary feature. This provides simple keypresses to open an entry for today or yesterday, without requiring to think about the date. It provides me quick access to make notes and continue my way. Similarly, the creating of new notes, inserting likes, and navigating these links, are made relatively easy with commands provided by vimwiki.

I suppose that it is not that difficult to recreate the basic behaviour of vimwiki with custom commands and navigating with `gf` between your notes. However, for me vimwiki provided an easy way to get started in an environment where these commands were provided out of the box. Since then, I have gotten used to, and somewhat attached, to vimwiki and have kept using it.


gf?


Vim command which opens the filename under the cursor https://vim.fandom.com/wiki/Open_file_under_cursor


Combination of the 'g' command (go-to) and 'f' to mean file. It attepts to open the file at the path under the cursor.


After originally using vim-wiki, and then slowly progressing through a dozen or so personal wiki software tools ( all FOSS ), about a year ago I settled on Tiddlywiki.

It's also all self-contained within one folder, but I can stick it behind a server and access the files from wherever. Without having to rely on syncing tools like nextcloud.

Tiddlywiki is actively developed and has a healthy amount of plugins, including a mindmap like plugin.


I've been using Tiddlywiki, but the editor is nothing short of atrocious. I just wish there was some sort of Tiddlywiki integration for vim.


Thanks, this is exactly what I was looking for


Came back to vimwiki after using it for years previously:

Things I've liked:

* Now supports Markdown, including for internal linking instead of just the Vimwiki markup

* I'd use just straight Vim, but being able to select a phrase, and quickly make a page to that and link them is nice.

* The HTML and link handling is nice, and it will auto hide the long URLs unless you're actively on them

* Outlines, outlines, outlines. I use them for everything, and they're handled well

* I'll even throw in the occational table, and the auto formatting also works for tables.

* At the end of the day, everything is Markdown text files.


Thanks for this comment! I already use Vim to edit semi-organised (Pandoc-style) Markdown files that I search using grep. I thought about trying vimwiki a few years ago but didn't want to learn another markup language. Glad to hear it now supports Markdown so I'll give it a try.


I've been using Vim as my main editor on BSD, Linux and Windows for > 20 years. I also use Vim extensions in the IDEs I use (Visual Studio, VS Code, PyCharm).

One of the things I love about PyCharm when dealing with Markdown is that you get a nice preview rendering side-by-side with the raw Markdown. Very useful. I'm not sure if VS or VS Code have something similar. At least VS Code, if it's possible, it's not enabled by default. Might be possible with an extension.


I use https://github.com/iamcco/markdown-preview.nvim with Neovim (should work with vim >=8 as well) It gives you live preview in browser. It also scrolls automatically to the part your vim cursor is at.


I’ve been using vimwiki for a while now and it seems to fit the way I work the best of all the options out there.

But, I recently dumped all my vimwiki markdown files into Obsidian and have really been enjoying that experience. Same local files with an upgraded visual experience and some neat linking features.

It has basic vim bindings, unlike roam and others, and that makes all the difference. I just wish I could use vim keybindings to switch between panes but I hope they’ll address that at some point.


I'm curious, did you consider org-roam (for instance on emacs-doom)?


I didn’t. Sounded like emacs has a large learning curve and that it wouldn’t have vim bindings? Perhaps That’s the wrong impression?


Try Spacemacs, default vi bindings


I couldn’t find what Obsidian is, do you mind to provide some links?


Sure, it's fairly new.

https://obsidian.md/

I found it via this recent HN post: https://news.ycombinator.com/item?id=23324598


I've been using vim-wiki for years. I'm a satisfied user. It supports alternative syntaxes, and I use markdown. I like that I can link to a folder on my local machine, or a file, or a web page and it loads in the correct application. With thunderlink I can also link to specific emails and have them open in Thunderbird.

I also use github.com/Konfekt/FastFold to make the folding fast enough to be useful, and github.com/plasticboy/vim-markdown to make vim understand the right way to fold.


I have been using a single plain text file as my note for 6 months now. I'm using vim mode on sublime though.

Switching to a plain text file that syncs to GitHub feels more permanent.

I've gone through several note apps (e.g. Evernote, Joplin) and I never really migrated the notes to the new app...

Anyway, I have my own apps to share. They might be useful to others.

* I use https://github.com/tanin47/git-notes to sync my note file to a bit repo

* A programmable tooltip on Mac. You can program it to send the selected text on any app to your note file: https://github.com/tanin47/tip/wiki/Universal-Tip,-a-program...


Also take a look at https://github.com/lervag/wiki.vim which I found to be much simpler and easier to use.


What's the difference? When I was looking at using a wiki Vim I couldn't really see the difference between the two, why use one over the other.


I created wiki.vim after having used Vimwiki for some years. I wanted to clean up the code and make it less "bulky" - Vimwiki is a filetype plugin, a wiki linker plugin, a plugin for handling/managing todo lists, and much more. There are a lot of very good Vim plugins for e.g. Markdown filetypes and for todo lists. So, I decided I wanted to simplify and make wiki.vim with a primary focus on the wiki specific features: link and url handling and graph features. I've also included the diary/journal features.

It sort of started as a fork. And at the time, the Vimwiki maintenance was quite inactive and issues were not addressed. I tried to fix things, but the code was quite messy.


Wow, thanks for the reply. Never had a direct reply from a software creator before.

I only started using vim at the end of last year so am still very inexperienced. I'm not sure what a file type plugin is and to be honest had a hard enough time I stalling plug to get vimwiki installed. I'll take a look at wiki.vim too. I like the idea of the diary/journal. I use that in zim-wiki all the time.

Thanks again for the reply.


Plus one on that. I had some issues with vim-wiki, and wiki.vim is lighter weight and supports my work stream more easily.


Is this anything like "org mode" for Vim?

I am not an org mode user, but I've heard people gush over it.


Only in that it uses a markup language that can link to other files/pages in the wiki.

Org-mode: "Org mode is for keeping notes, maintaining TODO lists, planning projects, and authoring documents with a fast and effective plain-text system." via https://orgmode.org/

See also: https://orgmode.org/features.html


Something to try is Spacemacs which provides vim bindings for emacs and then use org-mode directly.

https://www.spacemacs.org/


You're looking for this https://github.com/jceb/vim-orgmode


Not even close. Org-mode is much more complex and has way more features.


There are some attempts but don’t come even close to the real thing.


With all the posts on HN about paid personal knowledge bases like Roam I'm excited to see a free and open one leveraging my favorite editor.


Check out org-roam.

It does have the emacs string attached but I've been using doom emacs with it (for vim keybindings) and the learning curve is 100% worth it. 3 weeks in and I haven't looked back here.


Another vote for org-roam.

It's such a nice piece of code, and the author and community are fantastic. Asking for help is encouraged, as is sharing your modifications to the standard workflow.

It's also actively developed, and as such new features are frequently popping up.


Thank you! I have been looking for an open source Roam alternative. Do you have any tips to getting started?


Curious if there's a Vim version of org-roam?


There is not.


I've been using Vimwiki for years. I've tried other note taking/todo listing/whatever solutions but I always end up back at Vimwiki. The only thing better than it that I've found is Emacs' OrgMode.


I tried Vim Wiki as well as others but they were either clunky or insufficient for my needs. So I jumped to Emacs. Org is truly remarkable.


I made a small ruby gem to convert (most) of vimwiki markdown format files into html (using GitHub's markdown conversions). May be of use to some of you reading this.

https://github.com/patrickdavey/vimwiki_markdown


I love vim wiki, but have never been able to use it. Or any wiki for that matter. I can't seem to find the right mind frame to keep feeding the wiki. I do it for a while, and than I just stop, since I am not able to make a good workflow.

I also haven't been able to find a solution that would easily be publishable, with the right format for me to search over it.

(Another meta problem is that every time I try to consistently use a wiki it I seem to fall in the types of thoughts that the previous paragraphs show, and I simply get discouraged and drop the project)


I've been using this for years for basic knowledge store. It's great how you can also link to other wiki notes like anchors on a webpage.

On a side note: The 3rd screenshot. Is that really possible? Shifting all done tasks to the done section automatically? Or is this just manually arranged for the sake of a screenshot?


Years and years ago I used Tomboy (https://wiki.gnome.org/Apps/Tomboy) because it had a decent UI , though it's storage mechanism left something to be desired...


I'm a big fan of Trello for life organisation and one of the best bits is being able to view and add on my phone.

Obviously vim isn't particularly mobile friendly. Any ideas on how to view/edit from afar?


I don't organize my life so I never had a need for TODO lists. I get stress from seeing TODO lists. I deal with shit when it's in my plate. Maybe I could mitigate some things by planning better. But until know I planned as I need and my personal life is in good shape.

Work I tried many times to have lists. Doesn't work either. I just have text files and or mindmaps about things I'm workin on. It contains everything what I'm thinking, code snippets, links to websites, meeting minutes, short todo items or things I'm waiting on. Doesn't really have any form it evolves. After I'm done that os my little knowledge base of the thing I worked on.

This is the easiest way to describe what I do.


I have syncthing set up on my laptop and phone. On my Android phone I use Markor for viewing and editing the files, and the changes are then synced back to my laptop.

Admittedly I don't use Markor very frequently, and often just use Evernote instead when I'm on my phone and want to jot down something quickly... This is mostly because I feel the need to organize in folders etc when using Markor and vimwiki, so my mental model of it includes a bit more friction compared to Evernote.


I organize my notes the same way, though I have a structure of my documents: every midnight my server creates a new directory with today (06-05-Fri) which I work with. So when I need to create a file with Markor (which is very rare case), I create it there. The only issue I’m having with this system is that Markor does not work with symlinks, which I use frequently. Or maybe it’s not Markor but Android, not sure on this part.


I've used Org-Trello [1] in the past to sync an org file with a Trello board. I did this for a few semesters to quickly move all my homework assignments into Trello. Obviously this is an Emacs mode; if you're a Vim veteran, you can always use evil-mode to get the Vim keys in Emacs. YMMV

[1]: https://github.com/org-trello/org-trello


I'm looking for something like vim-wiki or org-mode or the like that allows you to both edit and view the content in vim as well as the web, somehow syncing the two. Does this exist?


I mainly use the https://github.com/euclio/vim-markdown-composer plugin for this. Just run :ComposerOpen in vim after installing the plugin, and it should work.


If they'd couple this to Git, it could be even more useful (e.g. you'd have backups, syncing between devices, and perhaps even multi-user access).


There is nothing stopping you from doing exactly that, and I have.

All you do is go to the dir, do a git init, and then regularly you do an add and commit (and push).

Really simple due to the fact that all files are just plain text with markdown syntax.


side note: I really want those cpu/ram/network metrics in my shell instance as well. Anybody know how this person does that?


I'm not 100% sure, but I don't think they're actually in the shell. I think that's a status bar for a tiling WM, possibly xmonad.


Those are the icons that iTerm for macOS uses, so it might be that. To configure: Preferences > Profiles > Session > Configure Status Bar.


It looks like tmux.


using it for years, great plugin for task/todo list and notes/documentation


Is there an entry explaining how to quit vim?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: