Atom个性化设置

2018-05-13 by subond

1.Packages

推荐几个好用的packages.

1.Minimap

Minimap是Atom最流行好用的几个packages之一,它可以提供源码的全局视图。

https://atom.io/packages/minimap

picture

2.Highlight Selected

无需多说,代码高亮也是必备。

https://atom.io/packages/highlight-selected

picture

3.Linter

https://atom.io/packages/linter

picture

4.atom-beautify

https://atom.io/packages/atom-beautify

5.file-icons

https://atom.io/packages/file-icons

picture

6.todo-show

https://atom.io/packages/todo-show

picture

2.Theme

个人比较喜欢的几个theme.

1.Dracula

https://atom.io/themes/dracula-ui

picture

https://atom.io/themes/dracula-syntax

picture

2.Material

https://atom.io/themes/atom-material-ui

picture

https://atom.io/themes/atom-material-syntax

picture

3.City-Light

https://atom.io/themes/city-lights-ui

picture

https://atom.io/themes/city-lights-syntax

picture

3.再高效一些

1.快速跳出成对出现符号

当我们使用atom编辑器时,括号、引号等符号往往是成对出现的。而且,当我们打出成对的符号,光标相应的移动到符号中间,方面书写。但是写完后再跳出右边的符号需要使用->这个键,移动距离过大,不是很方便。为了快速跳出,可进行如下设置:

init.coffee中添加如下代码:

# move cursor across the ending symbols...
EndingSymbolRegex = /\s*[)}>\]/'";:=-]/
atom.commands.add 'atom-text-editor', 'custom:jump-over-symbol': (event) ->
  editor = atom.workspace.getActiveTextEditor()
  cursorMoved = false
  for cursor in editor.getCursors()
    range = cursor.getCurrentWordBufferRange(wordRegex: EndingSymbolRegex)
    unless range.isEmpty()
      cursor.setBufferPosition(range.end)
      cursorMoved = true
  event.abortKeyBinding() unless cursorMoved

然后在config.cson中添加如下代码:

"atom-text-editor:not([mini])":
  "enter": "custom:jump-over-symbol"

参考资料

[1].10 Essential Atom Add-ons

[2].10 Best Atom themes of 2017

[3].The best Atom packages and themes

[4].用TAB在原子编辑器中跳过括号/括号/引号


工作中遇到的小技巧

2016-07-12 by subond

Ubuntu彻底删除Mysql,重装Mysql

# 删除MySQL
sudo apt-get autoremove --purge mysql-server-5.0
sudo apt-get remove mysql-server
sudo apt-get autoremove mysql-server
sudo apt-get remove mysql-common  #很重要

# 清理残留数据
dpkg -l | grep ^rc | awk '{print $2}' | sudo xargs dpkg -P
# 安装mysql
sudo apt-get install mysql-server mysql-client php5-mysql
# 启动mysql
# sudo /etc/init.d/mysql restart
# 安装phpmyadmin
sudo …
read more