There are a few blog posts you can find about using the Atom code editor as a Markdown writing program. Just recently I put Atom on a new machine ā and since each time I have to re-learn how to set it up, so this time Iām making some notes.
Installing plugins with APM
I had trouble installing the plugins sometimes due to a Self Signed certificate error. You can get around this by using an unsecured connection to the Atom servers, by using this command:
apm config set strict-ssl false
Once this is set up plugins can be installed. I use the command
apm install <package-name>
(note that on OSX to get the apm command on the command line you just need to go to the menu Atom > Install Shell Commands; then you can use the apm command in the terminal)
Packages for Markdown in Atom
Here is my list of packages I added to Atom and why:
Package | What it does |
---|---|
markdown-writer | generally handy markdown writing tools |
markdown-table-editor | really useful tool for automatically generating markdown tables |
atom-folding | (needed for markdown-folding) |
folding-markdown | allows you to fold markdown headings (toggle in the gutter next to headings) |
center-editor | centers the text. I don’t like this package as much as typewriter but this may work better for you |
typewriter | very good for full screen editing; puts text in the centre of the screen, toggle gutter and scroll bar on/off |
typewriter-scroll | fixes the insert point in the middle of the screen for writing |
highlight-line | highlights the line you’re editing |
pandoc | needed for pandoc-convert |
pandoc-convert | package for converting from markdown to other file formats. I’ve used this outside Atom, not yet tried it as the package |
project-manager | tool for marking folders as projects. I’ve only used it a bit. |
dracula-ui | nice set of colours for UI based on Dracula |
dracula-syntax | syntax highlighting in Dracula colours |
Example
Here’s an example of folding. Text:
Folded at heading:
Other setup
In the Atom settings (access by ctrl+,
) I do the following:
- Disable the wrap-guide package. This removes the vertical bar at the preferred line length (probably useful for code but not for writing).
- Set the soft wrap and soft wrap at preferred line length option checkboxes.
- I also disabled the autocompletion-plus package to stop the editor suggesting spellings as a type.
Hope this is useful to someone. There are a few other posts on users’ setups around the internet (e.g. this one).