Hacker News new | ask | show | jobs
by an6n 3889 days ago
Dear fellow hackers,

I've been looking for an application setup with what I could write my personal (research) journal using vim with markdown annotation and with embedded multimedia (screencaptures, mostly). It would be great to have a possibility to attach files to notes, too.

Of course I would like the setup to be open source. Does anyone have similar needs and perhaps solutions for them? I tried atom with vim-bindings-plugin and markdown-preview but somehow the UI just didn't cut it for me when compared to a native vim.

Please, share your setup if you have anything that resembles my need!

11 comments

It's early days yet but this is exactly what I'm trying to achieve with stash[0], plus the ability to browse notebooks over HTTP and run/embed dynamic queries into documents. It's essentially a specification of a directory structure for plain-text files and a bunch of tools for doing bulk manipulation. I began migrating all of my notes from Evernote a few months ago and it seems to be handling it well.

[0] https://github.com/no-silo/stash-design, https://github.com/no-silo/stash-server

I use mainly two tools: The vim notes plugin (https://github.com/xolox/vim-notes) and zim wiki (http://zim-wiki.org).

vim notes is very good at quickly jotting down and bringing up things from vim; much better than vim-wiki, in my experience. While it can export to html, since the main interface is vim it is not that nice for embedding images and such. Therefore I use vim notes mostly for stuff related to coding, which is naturally text-friendly.

For research notes and results, I've been using zim-wiki. While it has a GUI, it is a text-based format. Whenever I feel the need for vim shortcuts I just open the page in an external editor (vim), which is even supported in the GUI. The markup is not markdown but something similar to mediawiki, which is annoying but not a deal breaker. It can embed images, tables and latex equations (though the UI for this could be better; instead of a directly using $$ in the markup, there's a dialog). Since you mention screenshots, it also has a "embed screenshot" plugin which I've been using a lot more than I thought I would. It's also open source and has what seems like a healthy community.

If Evernote integrated Markdown into its mobile, web, and native editors, I would be much closer to an ideal. It's early, but Classeur shows potential to fill this gap.

I tried http://Marxi.co, the so-called "missing Markdown editor for Evernote," but had enough syncing issues during the brief ten-day trial to put me off purchasing a subscription.

There's also a Sublime plugin that offers two-way Markdown conversion into Evernote, but I only have Sublime as a native app, not on mobile or web. https://github.com/timlockridge/SublimeEvernote

Perhaps with Evernote's renewed focus on core product, they'll take a look at improving the experience of the text editor.

Hey Anton, are you attached to using markdown? A nice alternative, and the one I use for my own notes, is Emacs + org-mode. If you're a vim guy, you can load up evil-mode to get the vim keybindings. Org-mode is a really nice piece of software, my three favorite features are:

1. It's really easy to move things around. Moving a section up or down, re-ordering lists, etc. is done with very simple keyboard shortcuts.

2. You can embed source code in your document and you can also execute it and have the result inserted inside the document. This is great if you are describing a piece of code and you want to give examples.

3. Editing tables in org-mode is very easy and very nice.

I'm using tiddlywiki [1] and I absolutely love it. You can host it where you want (owncloud works fine), and it has basically everything you just described.

I edit mainly using the web interface, but you can also edit the "tiddlers" (each note) using any text editor. The note has it's metadata at the beginning of the file.

I think I'm only using a very small % of TW's capabilities, but it feels like a very powerful tool.

1: http://tiddlywiki.com/

I used dokuwiki quite similarly for this in the past and it was okay - I just wrote using browser and embedded images with it, too. Maybe I could edit the "source" using vim and have the wiki-pages using a browser be the reader-mode for my notes. Thanks
Yea, I used to use Wiki on a Stick on a flash drive. When I had to migrate away, I ended up going to Evernote rather than Tiddlywiki. But it's a great tool.
Was and still am a big evernote fan. I just switched away from it towards tiddlywiki to be in full control of my data.
I'm looking for the same thing as you.

On a mac, VooDooPad fits the bill but it is not open source and its future looks murky. If it were open source with an active community of users I think I would use it.

This has kept me on vimwiki with .md extensions so that vim will at least do syntax highlighting for markdown. You can easily link to local multimedia files, but they don't display inline. As a bonus, a diary entry for the day is just <leader>w<leader>w away.

Hello,

If you were willing to trade markdown for asciidoc (same goal, different execution), then a combination of asciidoc in vim simultaneously with the asciidoc previewed in google chrome could be a good approximation of what you want. Embedded images work quite well because you can easily specify the final width you want the image to take, on the page... for example. Finally, you can easily produce a pdf with 'a2x'.

https://en.m.wikipedia.org/wiki/AsciiDoc

https://chrome.google.com/webstore/detail/asciidoctorjs-live...

http://www.methods.co.nz/asciidoc/a2x.1.html

Also, this page is interesting:

https://en.m.wikipedia.org/wiki/Comparison_of_documentation_...

> write my ... journal using vim with markdown annotation and with embedded multimedia (screencaptures, mostly).

Are you asking for a WYSIWIG editor (one that shows you markdown and/or rendered html and pictures), or are you asking for a workflow where you dump some images in a folder and edit post.md, and link to images with markdown tags?

I don't (yet) actually need/use a blog - but just to see what I might be able to recommend others that ask, I had a look for stuff that works with github pages, and found Jekyll Now: https://github.com/barryclark/jekyll-now

I wouldn't say it's a great work-flow (there are gnarly bits with Jekyll, with using git, with hosting on github, with tweaking the themes...) -- but overall the out-of-box experience is good. It's not a WYSIWYG-happy-blog type situation, but it is a sane-defaults, not that-hard-if-you're prepared to install some things -- and crucially, it can run in a local "serve" mode that watches the filesystem for changes and gives a near-live preview:

   Local Development
   (...)
   gem install github-pages
   (...)
   # Clone down your fork
   git clone git@github.com:<uid>/<uid>.github.io.git
   # Serve the site and watch for markup/sass changes
   jekyll serve
I should note that "jekyll serve" is part of standard jekyll; so you don't have to use "Jekyll Now" by any means.

[edit: I should probably add that what I've actually been using myself lately is just IPython (for solving assignments in basic calculus and statistics). Sadly doesn't work with the "It's all text!"-plugin/external editor for vimperator as it doesn't use "plain" input-fields -- so if you do "real" writing, rather than just some code (and graphs generated from said code), you'll probably be better off with something more focused on the Markdown part, like Jekyll]

Thank you for your reply, I should've been more detailed in my question. I think I would prefer a setup where I edit using vim and the rendered html is instantaneously rendered next to the vim window. However, I think that embedding images from clipboard is tricky using vim, at least to my knowledge. So I don't really know how to setup an efficient workflow regarding that.

I think I will have to take a look at that jekyll now next. :)

> However, I think that embedding images from clipboard is tricky using vim, at least to my knowledge.

Yes. In general you'd want either a full URL or a local, relative URL, in order to source images from "the clipboard" to vim. Perhaps there are some plug-ins that allow drag-n-drop? There certainly must be some plug-ins for vim that could watch a folder(tree) and auto-complete (so you could have your blog.git/images-folder, and paste an image there, then link that via an image-tag in markdown, and have vim auto-/omni-complete the name, so you could easily link to images/filename-of-pasted-image.jpg).

Generally, most mature markdown-blogging solutions will have some form of live-relaod -- so all you need is to trigger a write to disk in order to see an update in the browser. Not quite as-you-type -- but probably good enough.

if you're on the mac then you can use the Marked 2 App. It's a live preview of your markdown file that updates every time you save the file. I use it with Vim regularly. There's even a vim plugin to open the current buffer in it https://github.com/itspriddle/vim-marked
I write my own research journal using pandoc[0] and a simple mkfile[1]. My requirements are a bit different from yours, though. I don't need embeded multimedia, but I rather use a lot of Unicode characters for mathematics.

Maybe you could use write markdown and convert to HTML5 using Pandoc? Your multimedia could be included with some embedded HTML. If you automate the compilation process suitably, you can have your journal open in your browser while writing in Vim, and see the result almost real-time.

[0] http://pandoc.org/

[1] http://doc.cat-v.org/plan_9/4th_edition/papers/mk

There are some sweet extensions for Atom + pandoc, notably https://atom.io/packages/preview-inline and https://atom.io/packages/markdown-preview-plus (convert with pandoc, fast & smooth preview update via DOM diffing/patching). See https://discuss.atom.io/t/using-atom-for-academic-writing/19... for more goodies.

With non-Atom (e.g. Vim), https://github.com/yyjhao/markmon does fast DOM-diffing preview (I think it inspired markdown-preview-plus).

Different direction: instead of multimedia inside markdown, consider something that mixes markdown, multimedia and other fragments. I'm specifically thinking IPython or Sage notebook. Not sure it's a win in itself but there are many other benefits for research notes...

Finally, for those comfortable with latex writing, Overleaf in rich text mode is a quite good middle road — not markdown but less noise than raw latex: https://www.overleaf.com/blog/81-having-a-hard-time-convinci... (overleaf also has git access for offline)

For math in markdown, https://github.com/cben/mathdown/wiki/math-in-markdown lists all tools I'm aware off.

---

> I don't need embedded multimedia, but I rather use a lot of Unicode characters for mathematics.

Do you mean you use unicode as poor man's math support, or that you do render via pandoc/mathjax/etc but prefer to have $β^2$ rather than $\beta^2$ in the source? I'm curious, does in-place whole-formula rendering solve your need or do you actually care about unicode symbols in source?

And how would you ideally want to type them? "\be" offering autocompletion to β? http://kasperpeulen.github.io/PressAndHold/ ?

Yeah, I had something like that in mind. I even thought using latex (with Texmaker) but haven't quite managed to pull all the pieces together yet.
Pandoc can include LaTeX math, and render it in HTML in a few different ways.
I use https://github.com/tpope/vim-markdown to write markdown files. And use http://fletcherpenney.net/multimarkdown/ to 'compile' the markdown file. To check the rendered output I have a key mapping to compile the current markdown file and open the generated html file.
I think gollum could fit your use case.

https://github.com/gollum/gollum