4 ms·
Are most of you using dedicated markdown editors? What about using your code editor's markdown plugin and real time preview in a browser? For example with Vim
by nickjj 7y ago
Are most of you using dedicated markdown editors?
What about using your code editor's markdown plugin and real time preview in a browser?
For example with Vim, one of the plugins launches a browser and then you get a real time preview while you type in Vim. The nice thing is you can tell it to use a specific CSS file so you can get a 100% copy of GitHub's README styles. It even syncs your cursor if you want that behavior.
I demo'd the above set up here: https://nickjanetakis.com/blog/writing-and-previewing-markdown-in-real-time-with-vim-8 https://nickjanetakis.com/blog/writing-and-previewing-markdo...
- abfar 7y agoI also just use Vim to write markdowns, but without any markdown plugins (beside the built-in markdown syntax highlighting in Vim) and I compile the document to pdf manually using Pandoc. I rarely need to write markdowns though, and my usage is not advanced at all (like to write simple writeups that sometimes require maths and code blocks, which I only use for myself). So Vim + Pandoc is enough for me.
- xrisk 7y agoDo you know how you can render the PDF to make it look like Github's HTML render?
- ScottFree 7y agoIn my opinion, markdown is a document format not unlike Rich Text Format (RTF). I want a program to read it, style it and let me edit it the way it's intended to be read. I don't want to see the code unless the program is getting in my way. I'm sure everybody's come across a text editor that insists you meant to indent that next bullet point and gets very stubborn when you want to do something different. That's what I like about Typora. I don't have to think about the code until I want to do something the program doesn't want me to do. When that happens, I can switch to code view and make it do exactly what I want it to do. Then I switch back WYSIWG mode and keep going.
- nickjj 7y agoIf you use a live preview plugin with your code editor you can choose not to look at the code and focus on the rendering of it in a browser.
- ScottFree 7y agoWhy would I do that when I can edit the rendered version directly?
- nickjj 7y agoOne benefit I guess is you don't need a dedicated program and you can continue using your code editor. You also have full control of what the render looks like (which is helpful for GitHub READMEs). Also with Vim (I can't speak for other editors) it has the option of concealing the markdown characters themselves so it looks more like a rendering of it. I don't use that personally but if you prefer not seeing the noise of backticks for code blocks or double asterisks for bold you can hide it.
- ScottFree 7y agoYou don't seem to be getting the point. Vim is for code. Typora is for documents. They are different tools tailored specifically for different jobs. You wouldn't use microsoft word to write code, would you? If you like vim and want to use it for markdown, that's great. I personally like a more specialized tool. Then again, I'm also a writer and spend more time in that mode than most programmers. If you spend all your time programming and only occasionally need to write a markdown document, then I can see the appeal of the setup you're describing.
- nickjj 7y agoI spend about 50% of my time programming and 50% writing. I often deal with 300,000+ word markdown files because part of what I do for a living is write technical courses. I've written about a million words of markdown over the last ~5 years.
- afarrell 7y agoI use vim for markdown editing, but I've been searching for a better alternative. Mainly, I want to be able to easily copy-paste between the editor and other programs. This is hard with vim because yank doesn't pull into the system clipboard by default. In my 11 years of working with vim, I've only found a reliable way to configure that behaviour twice, but it stopped working.
- nickjj 7y ago> Mainly, I want to be able to easily copy-paste between the editor and other programs. This is hard with vim because yank doesn't pull into the system clipboard by default. In my 11 years of working with vim, I've only found a reliable way to configure that behaviour twice, but it stopped working. If you run Vim with +clipboard support then you can yank things directly to and from your system clipboard by setting `set clipboard=unnamedplus`. Then Vim copy / pasting will work seamlessly like any other program on your system. You can also have it seamlessly work with tmux too and even with WSL if you're using terminal Vim in Windows through WSL. Here's a video that demos how it all works and also has a link to my dotfiles: https://nickjanetakis.com/blog/getting-copy-paste-to-work-in-wsl-with-tmux-and-terminal-vim https://nickjanetakis.com/blog/getting-copy-paste-to-work-in...