Atom writes markdown and downloads atom plug-ins locally

Time:2020-4-4

If you’ve used sublime, you’ll love it ATtom 。 There are many similarities between the two operation skills and plug-ins, but they are written in different languages.

Atom introduction

In the field of web development, the update of editor is very fast. The last editor that makes the web development field a sensation is sublime text. Today, GitHub has developed its own editor, atom. If you are familiar with the operation skills of sublime, you will soon adapt to and fall in love with atom. Atom is built by web technology, so every window is a web page rendered locally.

Why atom is used

I’ve been looking for a good one recentlyMarkdown editor, tried a lot, but didn’t find a good one. In general, the online editor is not full of functions, and it is difficult to save. Most clients’ writing and coding speed is slow. Although sublime can download the enhancement plug-in of markdown, it does not support local preview, and the HTML file rendered by the browser is ugly and chicken ribs. Later I learned that atom can preview locally. The most important thing is that the writing skills are very similar to sublime, the speed can be guaranteed, and it’s natural to start using it. However, it’s only for blog writing, but for article writing, it’s still necessary to use a god like editor to write code sublime

Plug in download failed

When I downloaded the plug-in, I used to download the semi graphical interface, but there was a problem of download failure, baidu did not get a good explanation. After all, the official documents of atom are not perfect and there are not many materials.
The following picture shows the failure:
Atom writes markdown and downloads atom plug-ins locally
Take save auto as an example, because I have installed it locallyactivate-power-modaPlug in – the famous cool hanging and exploding plug-in. Of course, it’s OK to write an article. Don’t use it to write code. Your head is dizzy.

Download plug-ins locally through Git

The method is as follows:

  1. In git, (I use the GitHub client git shell )Switch path to address in picture- C:\Users\lenovo\.atom\packages Everyone’s computer address is different.

  2. Git clone down the plug-in you want to download (click the plug-in name in the picture to find the warehouse address on GitHub)

  3. The command prompt CD enters the plug-in directory, NPM install waits for the plug-in installation to complete

  4. Restart Atom

The code is as follows:

cd ~/.atom/packages
Git clone < the warehouse link of the package you want to install > (for example: git clone https://atom.io/packages/activate-power-moda
CD < package Path > CD Emmet atom
npm install

Using atom to write markdown

It’s easy to use atom to write markdown, which can be previewed in real time, and the typesetting and rendering are relatively good-looking. It supports custom themes and syntax highlighting, and supports timely rendering of picture links, because the editor itself is a web page. Plus cool activate-power-moda Plug in, it’s like making a work of art.
The rendering effect is as follows:
Atom writes markdown and downloads atom plug-ins locally

Markdown picture problem

The inconvenient part of using markdown is the problem of image insertion. Many software charges in the local upload function. There are two solutions.

  1. Use relative address, place the picture and xxx.md file under the same level folder, and then
    ! \ [picture description] \ (XXX. PNG) format is OK, but when publishing a blog, the relative address must be complete. Otherwise, there will be problems. This method is not compatible.

  2. Use qiniu cloud to put the picture in qiniu cloud space, and then copy the external link address. Once and for all, you can share it everywhere without worrying about compatibility.

  3. If you have a better solution or editor, please let me know.

A brief summary of trying out atom

Advantage

  1. Beautiful interface, similar operation and sublime, low learning cost.

  2. It is very convenient and comfortable to write markdown.

  3. GitHub is officially supported by many geeks.


shortcoming

  1. Short development time, unstable version, more bugs and less reference documents.

  2. It’s made by web rendering. It’s slow to open and start, and inferior to sublime.

The two have their own advantages. Usually, you write code with GitHub, write a markdown article, blog, and strongly recommend atom