Sublime Text 改造计划

为什么选择 Sublime Text

之前用了很多年的 Intellij Idea ,这是一款重量级的 IDE,功能强大,效率超高,用起来非常爽。

缺点就是启动速度太慢,没有漂亮的皮肤主题。

前端和后端有很大的不同,我不想为了做个小的项目就动用这么重的工具,于是就把视角瞄向了编辑器。

过年期间尝试了不少编辑器,有 github 家的 Atom,当然也少不了 Sublime Text,经过尝试和验证, 因为性能方面的考虑,最终还是选择了 Sublime Text,毕竟收费的产品相对免费的,更有优势。

正如其官网所介绍的:

Sublime Text is a sophisticated text editor for code, markup and prose.
You’ll love the slick user interface, extraordinary features and amazing performance.

为何要改造

Sublime Text 默认的设置已经能满足一般的开发需求了,但是,用过 IDE 的人怎么能忍受如此低效的开发呢,我想把 IDE 中提高效率的功能移植过来。

默认的皮肤也不够 cool,怎么能没有逼格呢?

如何改造

调整主题

改造的第一步就是把编辑器改头换面。

个人喜欢简洁大方的设计风格,选择了 Spacegray

《Sublime Text 改造计划》

安装扩展插件

格式化

  • Alignment

    Easy alignment of multiple selections and multi-line selections

  • HTML-CSS-JS Prettify
    HTML, CSS, JavaScript and JSON code formatter for Sublime Text 2 and 3 via node.js

效率相关

  • AutoFileName
    autocompletes filenames

  • Color Highlighter
    ColorHighlighter – is a plugin for the Sublime text 2 and 3, which underlays selected hexadecimal colorcodes (like “#FFFFFF”, “rgb(255,255,255)”, “white”, etc.) with their real color. Also, plugin adds color picker to easily modify colors.

  • Emmet
    Emmet (ex-Zen Coding) for Sublime Text

  • ExpandRegion
    Like “Expand Selection to Scope”. But better!

  • MacTerminal
    Open terminal/iterm 2 on current file folder (new tab and ST2/ST3 support)

  • Local History
    A Sublime Text 2/3 plugin for maintaining local history of files.

技术栈相关

  • Better CoffeeScript
    Syntax highlighting and checking, commands, shortcuts, snippets, watched compilation and more.

  • SCSS
    The TextMate SCSS Official Bundle.

  • PHP-Twig
    A TextMate (and Sublime Text) bundle for Twig.

增强

  • SublimeLinter coffee-script html ..etc

  • JavaScriptNext

快捷键替换

基于 intellij 对常用的功能的快捷键进行重定义

  • html 元素 扩大选择 缩小选择
    alt+up alt+down

  • 在当前文件,项目位置打开终端 termial

  1. shift t

  • 外部包裹指定标签 warp

  1. win t

  • 代码格式化 shift win L

结论

杀鸡焉用牛刀,磨刀不误砍柴工。

    原文作者:王铁手
    原文地址: https://segmentfault.com/a/1190000004488422
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞