一、换行无法自动缩进的问题,如图:

  

  稍微查了一下网上的办法,是把汉化文件删除,但是会造成菜单栏混乱,简直无法忍受。。。

  那么这里介绍的是另一种解决办法。在用户的热键配置文件(preferences-key binding-user)中加入以下代码:

    { "keys": ["enter"], "command": "auto_indent_tag", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
]
}

  

  保存配置文件之后,换行就能够正常缩进了,如图:

  

二、顺便把tab键的缩进也处理一下,按一次tab缩进足够的距离

  处理之前,需要这样按tab。。。如图:

  

  处理之后,tab一次到位,如图:

  

  和上面的一样,在用户的热键配置文件(preferences-key binding-user)中加入以下代码:

    // Press the tab indent a sufficient distance
{ "keys": ["tab"], "command": "reindent", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
]
}

  Tips:小白注意看我的图,在之前的代码后面加个逗号

  

  

  说白了其实就是热键冲突的问题。。。END

文本编辑器 - Sublime Text 3 换行无法自动缩进的解决方法的更多相关文章

  1. 【开发工具】- 推荐一款好用的文本编辑器[Sublime Text]

    作为一个程序员除了IDE外,文本编辑器也是必不可少的一个开发工具.之前一直在用的是NotePad++.EditPlus,这两款编辑器,但是总感觉差点什么,昨天在知乎上看到有人推荐Sublime Tex ...

  2. [SublimeText] Sublime Text 2 运行 Python 脚本中文路径解决方法

    在 SublimeText 中直接运行 Python 脚本,出现以下报错提示: Running python -u C:\Documents and Settings\Administrator\桌面 ...

  3. 2016/4/26 sublime text 2 版本 遇到的问题及解决方法

    1.汉化:下载汉化包 .打开程序Preference下的浏览包文件夹.将解压的程序包粘贴进包文件夹2.破解:标题栏上面有带(unregistered)表示还没有注册: 打开HELP→Enter lic ...

  4. 比NotePad++更好的文本代码(C#)编辑器Sublime Text

    原文:比NotePad++更好的文本代码(C#)编辑器Sublime Text 前言 前两天在博客园看到@晴天猪的博客发表的关于他使用的代码编辑器,自己索性试了一下,果断好用,自己也来记录一下.以便以 ...

  5. sublime text 3 无法安装Package Control插件解决办法

    sublime text 3 无法安装Package Control插件解决办法 ***关于sublime text 3 常用的 Package Control插件的安装方法*** 1.CTRL+` ...

  6. secureCRT自动断开的解决方法

    转: secureCRT自动断开的解决方法 secureCRT自动断开的解决方法 在secureCRT上登录时,一段时间不用的话会自动断开,必须重新连接,有点麻烦. 有时候服务器端的 /etc/pro ...

  7. windows 10 删除库后自动恢复的解决方法

    目录 什么是windows 库? 手动删除不行吗? 如何正确的"删除"? title: windows 10 删除库后自动恢复的解决方法 date: 2019-06-09 15:4 ...

  8. /etc/resolv.conf文件自动恢复的解决方法

    /etc/resolv.conf文件自动恢复的解决方法: service NetworkManager stop #后台进程关闭 chkconfig NetworkManager off #配置关闭, ...

  9. SSH连接自动断开的解决方法(deb/rpm)

    ######### 修改后的: ## # tail -f -n 20 sshd_config#MaxStartups 10:30:60#Banner /etc/issue.net # Allow cl ...

随机推荐

  1. Qt 使用自带的OpenGL模块开发程序

    QT中使用opengl .pro文件中添加 QT += opengl 1.使用指定版本的OpenGL如下使用opengl4.5调用方法,使用指定版本的接口,必须设备图形显示设备支持对应OpenGL版本 ...

  2. C语言返回值

    C语言函数在结束的时候可以用一个数字表示运行的结果,这个数字就叫做函数的返回值. 主函数应该有一个返回值.如果这个返回值是0就表示程序希望计算机认为它正常结束,如果不是0就表示程序希望计算机认为它是出 ...

  3. JAVA线程笔记。

    继承thread类 并覆写thread类中的run()方法. class 类名称 extents Thread{public void run(){}}实现Runble接口的run方法 线程的star ...

  4. timber|stain|compensate|

    N-UNCOUNT 木材;原木;树木:林木Timber is wood that is used for building houses and making furniture. You can a ...

  5. struts2学习笔记之十四:使用注解配置Action(不是和spring集成使用)

    Struts2支持使用注解配置Action,减少配置文件的配置 Struts2如果要支持注解配置Action,需要插件的支持,导入插件struts2-convention-plugin-2.1.8.1 ...

  6. php 正则获取html任意标签

    <?php $temp = ' <div class="num">1</div> <div class="num">2 ...

  7. 基于Jquery的textarea滚动条插件(原创)

    之前项目中自己写的滚动条插件.先前太忙没有好好整理.现在项目间歇期拿出来整理后贴出来 Demo Here css 我是把mCustomScrollbar 的UI 扣下来的. 这里我要介绍下这个插件不错 ...

  8. Oracle之函数中使用游标

    create or replace function getcustprodinstaddr(in_CustId in number,in_area_code in number) return va ...

  9. react-native start 启动错误解决方法

    ERROR Error watching file for changes: EMFILE {"code":"EMFILE","errno" ...

  10. 编程语言十万个为什么之java web的基础概念

    1.什么是JAVA Java是一种可以撰写跨平台应用软件的面向对象的程序设计语言,是由SunMicrosystems公司于1995年5月推出的Java程序设计语言和Java平台(即JavaSE, Ja ...