Fork me on GitHub

Atom之插件管理

用好Atom插件不可少,让我们玩转Atom插件

Atom安装插件

方法1:使用apm安装工具(推荐)

apm(Atom Package Manager)是atom的包管理工具,可以方便的管理Atom的插件.

下面以安装插件autoclose-html为例

1
2
3
4
5
6
7
8
9
10
C:\Users\Administrator>apm -v                   # 查看apm工具版本
apm 1.18.11
npm 3.10.10
node 6.9.5 x64
atom 1.23.1
python 2.7.11
git 2.15.0.windows.1
visual studio
C:\Users\Administrator>apm install autoclose-html
Installing autoclose-html to C:\Users\Administrator\.atom\packages done

批量安装插件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$ cat atom_packages.txt
emmet
minimap
file-icons
​docblockr
autoclose-html
highlight-line
highlight-selected
simplified-chinese-menu
sublime-style-column-selection
markdown-preview-plus
markdown-scroll-sync
language-markdown
markdown-image-paste
markdown-table-editor
markdown-themeable-pdf
pdf-view
$ apm install --packages-file atom_packages.txt

方法2:使用git clone整个插件的仓库

这种方法可能会少相关依赖,需要自行在package里运行npm install安装相关的依赖。
在atom.io上(或者在atom设置界面中跳转到插件的网页)找到插件页面,点击Repo跳到插件的github仓库,将替换为仓库的地址,然后在packages目录下运行下列命令:

1
$ git clone <repo-url>

方法3:使用自己创建的仓库

为了保证各个设备的Atom设置同步,可以自己新建一个git仓库,把自己的插件及配置文件(config.cson,snippets.cson等等…) 提交上去,今后就可以方便的安装自己提交上去的插件啦!

1
$ git clone https://github.com/alucardlockon/MyAtomPackagesAndConfig

Atom卸载插件

1
2
3
D:\svn\192.168.200.104_devops_doc\trunk\Editor\atom>apm uninstall simplified-chi
nese-menu
Uninstalling simplified-chinese-menu done

参考资料

Atom安装插件的几个方法

======================================================
希望各位朋友支持一下

本文作者:dongsheng
本文地址https://mds1455975151.github.io/archives/81611243.html
版权声明:转载请注明出处!

坚持技术分享,您的支持将鼓励我继续创作!