关于sublime text3 的Tab键缩进问题
web Sublime Text3 2020-08-10 2079 0
关于本站

“最难不过坚持”

本人承接扒站仿站,php网站维护,病毒查杀,网站编辑,网站改版,html制作

有需要网站维护,改版,病毒查杀,网站编辑,网站备案,html制作等相关的工作可以联系我。
本人有多年相关工作经验,也可提供免费咨询,交个朋友。
有需要探讨问题的朋友,也可以加我微信,共同探讨!
微信:15011482830 QQ:408917339

6399729 2609 39
最新评论
https://jueru.net/
评 留言
:weixiao:
评 留言
:shuijiao: :weiqu: :zhenbang: :leng:
评 留言
:yiwen: :yiwen: :yiwen: :yiwen:
评 EasySass: could not generate CSS file. See Output panel for details.
这个业务逻辑多少都有点奇怪了,阅读浏览次数增值在新闻详情页的控制器方法里setInc,这怎么还写进模型事件里了。如果非要用onAfterRead也可以,把新闻文章的内容单独分出来一个news_content表,然后把它和news做关联,然后给news_content表的onAfterRead事件做增值处理,这样点进新闻页内查询到文章内容时才会触发它。
评 TP6模型事件-查询后onAfterRead不好用
文章标签更多
ThinkPHP (254)
Mysql (58)
DedeCms (33)
jQuery (67)
证件照 (1)
setInc (4)
setDec (4)
onclick (5)
打开边栏(ESC) 关闭边栏(ESC)

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

from clipboard

在首选项 - 按键绑定 - 用户中(Preferences - Key Bindings-User)加入以下代码:

from clipboard

代码:

[
    { "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 },
        ]
    }
]

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

from clipboard

二、顺便把tab键的缩进也处理一下,按一次tab缩进足够的距离
  处理之前,需要这样按tab。。。如图:

from clipboard

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

from clipboard

和上面的一样,在首选项 - 按键绑定 - 用户 (Preferences - Key Bindings-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:注意看我的图,在之前的代码后面加个逗号

from clipboard

版权声明:本篇文章来源于网络。 来源链接

相关推荐
SublimeText3 ctrl+f打开搜索框后怎么关闭?
Sublime Text3 | 2017-07-05 9549
按esc就可以退出了,点那个 find all也会退出
五种Sublime Text 3同时快速编辑多行内容
Sublime Text3 | 2017-05-17 4104
1,鼠标选中多行,按下 Ctrl Shift L (Command Shift L) 即可同时编辑这些行; 2,鼠标选中文本,反复按 CTRL D (Command D) 即可继续向下同时选中下一个相同的文本进行同时编辑; 3,鼠标选中文本,按下 Alt F3 (Win) 或 Ctrl Command G(Mac) 即可一...
评论:0条
评论加载中...
发表评论