熟悉sublime text3

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了熟悉sublime text3相关的知识,希望对你有一定的参考价值。

  以下为小白首次摸索前端的记录学习

  在安装了几个广为人知的前端编辑器后,果然,sublime text 打开迅速,功能强大,一见钟情。

  遇到的首个问题是无法快速预览代码效果到浏览器。经过搜索,大部分人使用插件或者更改命令行使用快捷键。

  本次选择安装view in Browser 插件 预览到默认浏览器Firefox。

使用Package Control组件安装

The simplest method of installation is through the Sublime Text console. The console is accessed via the ctrl+` shortcut or the View > Show Console menu. Once open, paste the appropriate Python code for your version of Sublime Text into the console.

Sublime Text 3Sublime Text 2

import urllib.request,os,hashlib; h = ‘2915d1851351e5ee549c20394736b442‘ + ‘8bc59f460fa1548d1514676163dafc88‘; pf = ‘Package Control.sublime-package‘; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( ‘http://packagecontrol.io/‘ + pf.replace(‘ ‘, ‘%20‘)).read(); dh = hashlib.sha256(by).hexdigest(); print(‘Error validating download (got %s instead of %s), please try manual install‘ % (dh, h)) if dh != h else open(os.path.join( ipp, pf), ‘wb‘ ).write(by)

粘贴此代码到命令行然后回车。

详细内容见网站https://packagecontrol.io/installation#st3

安装好后,在Preferences会看到package control。此时重启sublime text3。

package control 安装好以后,就可以安装许多想要使用的插件了,在学习过程中可以慢慢探索自己喜爱的方便使用的插件。

安装插件的方法是

  1. 按下Ctrl+Shift+P调出命令面板
  2. 输入install 调出 Install Package 选项并回车(单击亦可),然后在列表中选中要安装的插件(搜索View in Browser,点击即可,在左下方会显示安装成功)

 

 

以上是关于熟悉sublime text3的主要内容,如果未能解决你的问题,请参考以下文章

sublime text3 添加新片段

熟悉sublime text3

Sublime text3最全快捷键清单

Sublime text3最全快捷键清单

为什么要选择Sublime Text3?

一个前端程序猿的Sublime Text3的自我修养