515 points · by type0 · 9y ago · 120 comments
I've been using this for years, and keep all my notes in a wiki[0], written in GitHub flavour mark down, with syntax highlighting etc. in the editor. I guess it's not orgmode (which sounds amazing), but it seems really really good to me.
I created the vimwiki_markdown[1] gem which allows you to convert GH style markdown to HTML using the wiki. Now I might just call out to pandoc, but I didn't know about it at the time, and my gem works fine*
I love that you can have project specific wikis etc. It's just so great. I'll also link to the relevant section in my .vimrc[2] if you are going to go down the markdown route.
[1] https://github.com/patrickdavey/vimwiki_markdown
[2] https://github.com/patrickdavey/dotfiles/blob/682e72e4b7a70e...
So often when I am taking notes, the notes involve diagrams. Markdown is great at text, but has nothing for diagrams.
After a lot of thinking about this problem, I've decided to start using an iPad with an Apple Pencil and Microsoft OneNote. Here is an example of some notes I took when thinking about an AudioUnit plugin that would dilate time:
https://1drv.ms/o/s!AtbMnk02vU5DgQBbmSeyPx9zd1Dn
VimWiki is definitely very cool. Just sharing this in case anyone out there has the same concern as me about drawing diagrams.
That said, I rarely draw pictures and defer diagraming to my co workers, so vimwiki will fill a purpose for me.
https://monodraw.helftone.com/
It was a ruby rogues pick a while back, you might like it!
- [ ] For an unchecked item
- [x] For a checked itemI use it with taskwiki [1] extension, which stores all the tasks in the awesome Taskwarrior [2] CLI task manager. With this, I have my tasks in my text files, searchable just a command away on the CLI or my mobile phone via the Android app.
[1] https://taskwarrior.org/ [2] https://github.com/tbabej/taskwiki
Being able to easily edit on the phone (iOS) side is what has kept me on something like Wunderlist. I prefer text files on my laptop and home machine, but it's not as easy to edit them on iOS.
* https://play.google.com/store/apps/details?id=kvj.taskw
* https://play.google.com/store/apps/details?id=com.taskwc2
Syncing happens via taskd server daemon [1], if you don't want to self host, kind people run public syncing servers:
* https://inthe.am/ (also provides web interface)
I like the idea of just being able to add todo items quickly from a shell without opening the task list but I imagine those items would not be reflected in my taskwiki list without some kind of taskwarrior hook.
Say you have all your work tasks tagged with 'work'. Then your taskwiki file might look like this
This file contains all the work-relevant information.
=== My work tasks | +work ==
* [ ] Implement feature X
After saving that file, you will see the task in taskwarrior as well (with the tag assigned).If you subsequently do: $ task add +work Test feature X
The next time you open the taskwiki file, it will look like this(syncing happens when you open the file):
This file contains all the work-relevant information.
=== My work tasks | +work ==
* [ ] Implement feature X
* [ ] Test feature X
The power of this setup is that you can add a task on your phone (i.e. when the idea hits you in the public transport), have it automatically sync over the taskserver to your desktop, and when you open the taskwiki file relevant to the project, the task is there!Many thanks for the above information and the initial recommendation. This setup seems to be exactly what I've been looking for for quite some time.
It says...
organize notes and ideas
manage todo-lists
write documentation
write a diary
I can already do these in vim, with text files or markdown files. What is this actually doing, then?Projects like this really deserve some high-level explanation like "Do you want to do X, but don't like having to do Y? This addresses that."
Todo Lists: Hitting C-Space marks the item as done or not done. It also creates a progress indicator on parent TODO items.
- [.] Do something
- [X] Something 1
- [ ] Something 2
- [ ] Something 3
Diary - Hit leader-w leader-w, you automatically get a new page created with today's date to write in. leader-w i will get you to a diary index page. leader-w leader-i will auto-populate that index page.Tables are auto-formatted to match the text you put into them.
All of this is entirely possible with plain text files, vimwiki just makes it easier to do. It's even compatible with markdown formatted files.
Does it have its own build/rendering engine, or can I use one I already know (Pandoc)?
And frankly, I simply consider it to be a wiki. I rarely if ever find the need to export it out. Makes for a great personal wiki if you're already in Vim.
I "link" them by path ( with gf you go to the file under path ), and every change is commited using https://github.com/nevik/gitwatch
I use grep ( or git grep ) for searching in my notes.
It also allows quick access to it and some form of file management (eg. When renaming a file)
I think it is also able to export to a real wiki platform.
let g:vimwiki_list = [{'path': '~/Dropbox/Public/briefcase/vimwiki'}]
All of the default commands are pretty nice. Here's a nice cheatsheet:Thanks for adding markdown support. :)
Is there a way in which I can show my gratitude? I can donate money or contribute code (if you need help).
Great work, please keep up the awesomeness!
When I started, VimWiki syntax was better supported than markdown. I've seen lots of markdown related pull requests come through, so maybe that's changed.
I use VimWiki for:
* Life goals (stretch and short term). I use it almost as a centering tool.
* Poetry
* Passages from books
* Book summaries (that I write)
* Lecture/Speech notes
* Notes on misc. items I want to explore
* Ideas for future science fiction short stories
Last summer I wrote a simple Awk script to extract VimWiki style definitions (Term::Definition) into TSV's for importing into Anki. I was frustrated that I couldn't fully automate this process without modifying Anki. Maybe someone else has figured this out?https://github.com/tbabej/knowledge
Beware, highly experimental, and the documentation is lacking (reading the tests would be the best idea to get a feeling how the syntax works).
And I believe that all of that is probably less than 50% of the whole of org mode. I will learn more as and when I feel the need. If you feel lost, read the org mode manual or ask the org mode mailing list.
I really want to learn either Vim or Emacs but I've never been able to decide which one to learn. Every time I've tried to search about this topic I end up in petty wars. Help?
(Disclaimer: I am a happy Spacemacs user, and it would take a lot to pry it away from me.)
I'd recommend learning vi, so you can learn how awesome modal editing is. Then, learn Emacs' basic commands for line editing (so as to make readline apps easier to work with). Once you've done that, evaluate whether a (Neo)vim with plugins or Spacemacs setup is better for you, then choose one of those.
- *-mode (specific syntax highlighting, commands, etc. based on project or task)
- edit/save remote files via built-in TRAMP [0]
- built-in plugin manager (interactive, or via emacs init config)
- MELPA [1]
- Non-blocking (e.g., run tests in one buffer while editing source in another)
- client-server approach (neovim adopted this, but emacs has had far more time to work out the kinks)
The main reasons I stay with vim are:
- already committed to vi-like muscle memory (and evil-mode, while admirable, doesn't cut it)
- no translation of VimL configs and plugins to Emacs Lisp
- many plugins for languages, frameworks, etc. which I use daily are severely out of date in emacs (and I'm too lazy to maintain them myself)
[0]: http://askubuntu.com/questions/79100/how-to-open-a-remote-fi...
[1]: http://melpa.org/
Use vim, learn vim all the way. If/when you're working on an "old" vi (e.g. the one in busybox, for embedded developers), you'll need to drop some of the more advanced stuff, but you'll still be able to do what you want, edit some config file or such, though it may feel a bit awkward at times. But when you're doing the heavy editing, you really want to use all of vim.
The main one is the concept of composability [0] - in vim, you're speaking a mini-language. You have commands (delete, copy, make uppercase,...), and a number of movements (right, down, to the next occurrence of a word, to line 27,...) or objects (word, line, paragraph, html tag, text within quotes, ...) to work on. These can be combined in any way you like, any command can be applied to any movement or object. So if you have a plugin like vim-angry that adds a "C-style function parameter" text object, all the commands you know can be applied to that. In contrast, in emacs, you have a number of commands (kill-line, kill-word, ...), and that's it. You have to get by with those. If they didn't implement the command you'd like to use, tough luck.
A second (minor) reason for me is that I work in the embedded software world, and usually on an embedded linux, there's at least some variant of vim or vi available, while emacs is very rare.
Take my advice with a grain of salt : I've never really used emacs, so I can't compare from first hand. From what I've heard, emacs is also a very good editor. To me, the question "should I use vim or emacs" is more or less the same as "should I use firefox or chrome" - I'm a chrome guy myself, but I don't consider firefox to be crap, nor its users to be idiots. Internet explorer on the other hand,...
So my advice : learn vim. And if you don't, learn emacs. Just learn to use either one properly, and you'll be way faster at editing than people who don't use those.
[0] a.o. https://medium.com/@mkozlows/why-atom-cant-replace-vim-43385...
So you just need to implement a bunch of selection commands to get Vim-style composability. I think lots of these modern text editors like sublime or atom come with select word, select parenthesized expression, select paragraph, etc. If the editor is extensible you can define new selection commands and compose them with the existing commands that operate on a region, just like Vim. Emacs certainly has a bunch of marking commands.
The extra commands you mentioned in Emacs (kill-word, kill-line, etc.) are just for convenience: Shortcuts for common cases. In Vim you can delete to the end of the word with dw. In Emacs you could also do a 2 keystroke solution: do mark-word, delete-region (you could use backspace, Control D or delete for that second second thing since they "operate on the region of the selection is active", so C-@ <backspace> would do it). Unlike Vim you also have the option of a single chord with the convenience command kill-word.
But the "select text and then apply command", as I understand it, still has a major drawback compared to vim's way of working : the dot-command. In vim, you go "daa" (delete an argument - i.e. delete the argument, including the comma which separates it, if you have the vim-angry plugin). Then you move to another argument, you just press dot, and the same thing happens.
Also, does the selection thing accept counts?
Why Atom can't replace Vim: https://medium.com/@mkozlows/why-atom-cant-replace-vim-43385...
I then discovered kakoune[1] and liked its design. I started getting familiar with it and using it more and more, and I think its core is much more solid than vim/emacs. It definitely doesn't have the same community support and plugins but it's already quite feature rich.
Then, if your friends use emacs, use evil-mode because vim is the best.
I'd still use vim-wiki because it's intended to be a lightweight knowledge database similar to a mind-map, but more robust. It allows for quick, easy organization of ideas whereas vim-notes appears to be more for a formal writing process.
I tried vimwiki with the files stored in Dropbox but it didn't go anywhere. I liked the simplicity of just bunging stuff in a semi-structured .md file.
I worked with Markdown files in Dropbox for several years. However in the last year or two, I sometimes have occaison to read/write notes from my phone or tablet and Sublime Text is not available for those systems. I tried various Android editors like Markdawn and DroidEdit but nothing I was satisfied with.
These days I am slowly gravitating to Google Keep. It's simple but OK for my needs and I can use it cross-device - on desktop these is even a Chrome app which works like a desktop app.
I've made some changes like make the left gutter grey have grey background (so I know where it starts and ends) and some other changes for the way I like to see html, php, js and css. I might have broken the syntax for other languages.
https://github.com/inod/contraste/blob/master/Contraste.tmTh...
three markup syntaxes supported: Vimwiki's own syntax, Markdown, MediaWiki
LiveComment is Editor/IDE-independent, cross-language, realtime & easy with client or server JavaScript plugins.
For example, my HN notes pool http://acpul.org/pool
What are people using for their wiki on iOS? Right now I'm syncing with iA Writer. It works pretty well, but doesn't support links. It looks like Bear is promising -- it uses the same style links, but it doesn't sync with a folder of text files. Any others out there?
I use https://daedalusapp.com/ which i can webdav remotely and rsync locally with vimwiki
{{file:../../images/image.png}}
{{http://example.com/image.png}}
Vim is of course not able to display images, but they appear when you convert the wiki page to HTML. ;; There probably are better solutions already
;; available somewhere.
(defun org-insert-screenshot (filename)
(interactive "sFilename: ")
(let ((filename (concat filename ".png")))
;; import is from ImageMagick, change to whatever you like to use
(call-process "import" nil nil nil filename)
(insert (format "[[file:%s]]" filename))
(org-display-inline-images)))I'd like to see if it would be easy to support ReST beside markdown. I'd like to reuse my current files instead of trying to convert them haphazardly...
As morantron says in https://news.ycombinator.com/item?id=13158062
you can navigate from within your existing markupdown* files in Vim by putting the cursor on the filename in your .md/.rst file, type gf, and Vim opens the target file.
I wanted to be able to use the links that I was going to write anyway in my .rst files, but they end in .html and when in vim you probably want to go to a .rst source file.
So you write them ending in .rst, and the makefile fixes that up before giving the file to rst2html. Proper nav within Vim and on the generated .html page.
Would work equally well with any capable programmer's editor that allows you to "go to the file under the cursor."
a) writing a syntax highlighting script for your notes files,
b) using tags to jump to documents and
c) using netrw for browsing your files?
Because if it is not, and even if it is just making it easier to do those things yourself, I would personally not even consider using it, having had some really nasty surprises with Vim plugins in the past. Yes, I do mean you, Powerline.Maybe in 10 years?
But you have to start somewhere.
> Maybe in 10 years?
Org mode has a 5 year advantage over vimwiki (2003 vs 2008) and significantly more contributors. Vimwiki only seems to have had meaningful contributions from others since Q3 2014 So maybe. Who knows.
It also assumes that the average vim developer has roughly the same skill as the average emacs developer. Is that true, though? Obviously I'm biased, but it seems to me that emacs is far friendlier to the sort of user who demands the ability to extend his environment as he wishes.
Which leads me to the question of whether as many vim users are also vim developers, as emacs users are also emacs developers? I think that the former is fairly uncommon, whilst the latter is fairly common. Sure, there are emacs users who don't extend it, but my perception is that they are far rarer than vim users who just use their editor.
[1] e.g. http://stackoverflow.com/questions/26669280/setup-a-personal...
There you go. Very little Elisp required, and maybe a little bit more if you want styles. But if you don't have the constraint of being able to browse file:// style, you can link absolutely, so you just need a template, which is doable.
Or you can use the Jekyll plugin, if you want to go that way.