关键词:
- 插件安装和使用
首先,要安装package control,按照官方方法安装:
https://packagecontrol.io/installation
重启Sublime Text 3。
如果在Perferences->package settings中看到package control这一项,则安装成功。
然后,调出package control,选择安装插件,搜索需要的插件,点击安装
sublime调出命令行控制面板:shift + command + p,所有功能都可以在这个面板中控制
重要插件的安装和使用:
1.sublime安装HTML-CSS-JS Prettify插件用于格式化html,需要先安装nodejs(默认安装目录:/usr/local/bin/node,一般默认安装):https://nodejs.org/en/download/,
格式化快捷键:command+shift+h
2.设置theme:(除编辑区以外的sublime风格)
Theme - Soda主题插件:安装Theme - Soda插件,Preferences -> Settings -
User,加入一句:"theme": "Soda Light 3.sublime-theme" 或 "theme": "Soda Dark
3.sublime-theme"
具体文档:https://packagecontrol.io/packages/Theme%20-%20Soda
设置color scheme:(编辑区的背景颜色、文字颜色)
可以结合安装colour-schemes高亮颜色主题:
http://buymeasoda.github.com/soda-theme/extras/colour-schemes.zip
Preferences->Browse Packages,把解压后的两个文件放入user目录
选择:Preferences -> Color Scheme -> User下的两个主题中的一个
3.Emmet插件(快速编写html和css)使用:
安装完插件后,使用ctrl+alt+enter呼出命令子窗口,在子窗口输入缩写命令,主窗口显示结果
或先设置文档为html格式,然后直接写缩写命令,写完加tab键执行
6.SublimeCodeIntel:js,php等代码的自动补全
js代码自动补全配置:
通过路径Perferences->Package Settings->SublimeCodeIntel->Setting - Defalut打开配置文件,找到如下配置项:
"codeintel_language_settings":
"Python3":
"python3": "/usr/local/bin/python3.3",
"codeintel_scan_extra_dir": [
"/Applications/Sublime Text.app/Contents/MacOS",
"~/Library/Application Support/Sublime Text 3/Packages/SublimeCodeIntel/arch",
"~/Library/Application Support/Sublime Text 3/Packages/SublimeCodeIntel/libs"
],
"codeintel_scan_files_in_project": true,
"codeintel_selected_catalogs": []
,
"JavaScript":
"codeintel_scan_extra_dir": [],
"codeintel_scan_exclude_dir":["/build/", "/min/"],
"codeintel_scan_files_in_project": false,
"codeintel_max_recursive_dir_depth": 2,
"codeintel_selected_catalogs": ["jQuery"]
,
"PHP":
"php": "/Applications/MAMP/bin/php/php5.5.3/bin/php",
"codeintel_scan_extra_dir": [],
"codeintel_scan_files_in_project": true,
"codeintel_max_recursive_dir_depth": 15,
"codeintel_scan_exclude_dir":["/Applications/MAMP/bin/php/php5.5.3/"]
找到"JavaScript"代码段,将
"codeintel_selected_catalogs": ["jQuery"]
改为:
"codeintel_selected_catalogs": ["JavaScript"]
保存。
重启sublime
7.html,css,js代码语法检测插件:
安装SublimeLinter插件(必须先装nodejs)
html语法检测安装sublimeLinter-contrib-htmlhint插件(sublime搜索安装插件),再安装htmlhint,htmlhint使用nodejs下的npm工具安装:
npm install -g [email protected],安装完成后,点击右键,SublimeLinter菜单里有很多设置,比如可以设置保存时提示语法错误
安装jshint和csslint,用于检测js和css语法,在sublime插件里搜索SublimeLinter-csslint 和SublimeLinter-jshint安装,再执行npm命令:
npm install -g [email protected]
npm install-g csslint@latest
特别注意,ccs是lint,其他两个是hint
最后,选择prefrences->package setting->SublimeLinter->setting user,使用以下内容覆盖:
"user":
"csslint_options":
"adjoining-classes": false,
"box-model": false,
"box-sizing": false,
"compatible-vendor-prefixes": false,
"floats": false,
"font-sizes": false,
"gradients": false,
"important": false,
"known-properties": false,
"outline-none": false,
"qualified-headings": false,
"regex-selectors": false,
"shorthand": false,
"text-indent": false,
"unique-headings": false,
"universal-selector": false,
"unqualified-attributes": false
,
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"jshint_options":
"browser": true,
"curly": true,
"devel": true,
"eqeqeq": true,
"evil": true,
"forin": true,
"globals":
"$": true,
"console": true,
"document": true,
"global": true,
"grunt": true,
"jQuery": true,
"module": true,
"setInterval": true,
"setTimeout": true,
"window": true
,
"jquery": true,
"latedef": true,
"noarg": true,
"noempty": true,
"quotmark": "single",
"strict": false,
"undef": true,
"unused": "vars",
"wsh": true
,
"lint_mode": "background",
"linters":
"csslint":
"@disable": false,
"args": ["--ignore=order-alphabetical,ids,box-model,font-sizes"],//去除ccs属性按字母排序的检测
"errors": "",
"excludes": [],
"ignore": "",
"warnings": ""
,
"htmlhint":
"@disable": false,
"args": [],
"excludes": []
,
"jshint":
"@disable": false,
"args": [],
"excludes": []
,
"mark_style": "outline",
"no_column_highlights_line": false,
"passive_warnings": false,
"paths":
"linux": [],
"osx": [],
"windows": []
,
"python_paths":
"linux": [],
"osx": [],
"windows": []
,
"rc_search_limit": 3,
"shell_timeout": 10,
"show_errors_on_save": true,
"show_marks_in_minimap": true,
"sublimelinter": "save-only",
"sublimelinter_executable_map":
"css": "/usr/local/bin/node",
"javascript": "/usr/local/bin/node"
,
"sublimelinter_popup_errors_on_save": true,
"syntax_map":
"html (django)": "html",
"html (rails)": "html",
"html 5": "html",
"javascript (babel)": "javascript",
"magicpython": "python",
"php": "html",
"python django": "python",
"pythonimproved": "python"
,
"warning_color": "DDB700",
"wrap_find": true
passive_warnings:设置为true时,保存文件只弹窗提示错误,不会弹窗提示警告
- sublime设置文档格式
shift + command + p呼出面板,输入set+文档格式首字母,比如html,输入seth,java输入setj,选择对应的格式即可
sublime简要笔记
选中单词 [1]选中当前单词 ctrl+d [2]跳过当前单词 ctrl+kctrl+d [3]选中相同的所有单词 alt+f3 [4]多行游标按住shift,然后按住鼠标右键向下拖动650)this.width=650;"src="https://images2015.cnblogs.com/blog/740839/201512/7... 查看详情
sublime学习笔记
...的名字即可2、python的脚本的运行commond+b3、commond+shift+p4、sublime既可以打开一个文件,也可以打开一个文件夹,当打开一个文件夹时,可以使用commod+key+b切换左侧的文件夹是否显示左侧的问价列表5、可以链接subl到/u 查看详情
lua学习笔记——2在sublime中配置lua运行环境
一、让Sublime可以运行lua脚本打开sublime选择tools-->BuildSystem-->NewBuildSystem 在新出现的文件中输入如下内容:{ "cmd": ["lua", "$file"], "file_regex": "^(?:lua:)?[ ](... 查看详情
萝卜德森的sublime笔记中文翻译版
...键偏好你可以按照你的喜欢做快捷键绑定.你可以在 SublimeText2>Preferences>KeyB 查看详情
sublime多行文档注释插件
安装docBlockr插件即可实现多行文档注释输入/**即可弹出如下文档代码注释/****/本文出自“前端开发学习笔记”博客,谢绝转载! 查看详情
sublime3安装配置
本文是SublimeText全程指引byLucida(http://www.cnblogs.com/figure9/p/sublime-text-complete-guide.html)的笔记,并添加了自己整理的一些内容,感谢原作者。1.下载可以从官网 http://www.sublimetext.com/3下载。2.Windows下安装与使用2.1安装1.Win764位系统... 查看详情
html学习笔记(代码片段)
...本的标签创建一个基本的html文件这里演示用的编译器是:sublime。当然你也可以直接用记事本来编写。打开sublime,创建一个以.html为后缀的一个文件(.html,.htm以上两种后缀名没有区别,都可以使用)输入:html:5+tab键会... 查看详情
笔记:sublimetext
http://www.sublimetext.com/3 Sublime Text官网http://www.sublimetextcn.com/3/ SublimeText中文官网 http://www.xiazaiba.com/html/5137.html SublimeText2中文版http://www.xiazaiba.com/html/24344.html S 查看详情
复制一篇笔记
文我的SublimeText必备插件sublime-text3 mqliutie 2015年05月09日发布推荐 8 推荐收藏 106 收藏,15.7k 浏览常用插件:SideBarEnhancementsHTML-CSS-JSPrettifyBracketHighlighterSublimeCodeIntelEmm 查看详情
前端开发笔记html基础
...ver(Adobe公司的产品,过时了,不是一个好的代码编辑器)Sublime(高效率的程序书写工具)WebStorm(更高级的项目级别编程工具)文档头声 查看详情
热键以分号结束行并跳转到 Sublime Text 2 中的新行
】热键以分号结束行并跳转到SublimeText2中的新行【英文标题】:HotkeytoendthelinewithasemicolonandjumptoanewlineinSublimeText2【发布时间】:2013-05-1612:49:00【问题描述】:我正在尝试找出工作中的热键。我刚得到这份工作,我或多或少第一次... 查看详情
在 Sublime Text 2 中,如何在新选项卡中打开新文件?
】在SublimeText2中,如何在新选项卡中打开新文件?【英文标题】:InSublimeText2,howdoIopennewfilesinanewtab?【发布时间】:2012-04-1505:21:33【问题描述】:当我在服务器上编辑文件并单击以编辑它们时,如果我正在编辑多个文件(例如HTML... 查看详情
在 Sublime Text 2 中,如何在新选项卡中打开新文件?
】在SublimeText2中,如何在新选项卡中打开新文件?【英文标题】:InSublimeText2,howdoIopennewfilesinanewtab?【发布时间】:2012-04-1505:21:33【问题描述】:当我在服务器上编辑文件并单击以编辑它们时,如果我正在编辑多个文件(例如HTML... 查看详情
『个人の笔记』百度ife---task1
=========================8.30分割线=========================Sublime:html5头部文档:ctrl+shift+pssh(html) <a>和<p>的区别:<a>标签定义超链接,用于从一张页面链接到另一张页面。<a>元素最重要的属性是href属性,它指示... 查看详情
[转]sublime插件
SublimeText系列SublimeText:学习资源篇Sublime插件:增强篇Sublime插件:Markdown篇Sublime插件:C语言篇Sublime插件:主题篇Sublime插件:Git篇Sublime小技巧:文本自动换行显示? 查看详情
sublime
有点怀念Dreamweaver的一系列操作功能?sublime的功能也很强大,安装插件后你会用的很愉快。在这里较为详细的介绍三种必备插件:sidebarEnhancements,ChineseLocalizations,Emmet。这里需要去网页下载的只有sublime软件,packagecontrol插件就可... 查看详情
sublime常用插件
sublime常用插件packagecontrolemmetalignmentsublimegitgitguttergitopenchangedfilessublimelinterchangequotessidebarenhancementsautofilenameviewinbrowser 查看详情
vscode中使用markdown
...rkdownvscode是微软推出一款轻量级的文本编辑工具,类似于sublime,由于其拥有丰富的插件,安装使用也非常简单,所以深受广大程序员的喜爱。markdown是一种可以使用普通文本编辑器编写的标记语言,通过简单的标记语法,它可以... 查看详情