Javascript 升华文本新行丢失缩进
我有一个问题,这是造成我在崇高的文本大量额外的击键。当我创建两条新行时,缩进是正确的。但是,如果我向上箭头返回这些新行,缩进就消失了,我回到了位置0(对于所有文件格式都是这样)。我做错了吗?这是故意的行为吗?我喜欢代码中的空白,所以这很痛苦 重新创建: 编写功能代码,例如Javascript 升华文本新行丢失缩进,javascript,sublimetext2,indentation,Javascript,Sublimetext2,Indentation,我有一个问题,这是造成我在崇高的文本大量额外的击键。当我创建两条新行时,缩进是正确的。但是,如果我向上箭头返回这些新行,缩进就消失了,我回到了位置0(对于所有文件格式都是这样)。我做错了吗?这是故意的行为吗?我喜欢代码中的空白,所以这很痛苦 重新创建: 编写功能代码,例如 function Bob(){ | indent starts here } 一切都好。然后,我添加了两条新线,向上箭头回到中间,我得到: function Bob(){ | inde
function Bob(){
| indent starts here
}
一切都好。然后,我添加了两条新线,向上箭头回到中间,我得到:
function Bob(){
| indent starts here
| indent starts here
| indent starts here
}
我想:
function Bob(){
| indent starts here
| indent starts here
| indent starts here
}
除了改变我的编码风格之外,还有什么建议吗:-)
谢谢
编辑:显然这不是预期的行为。下面列出的首选项和插件,以防它们干扰
用户首选项:
{
"auto_complete": true,
"auto_complete_with_fields": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"detect_indentation": true,
"draw_minimap_border": true,
"fade_fold_buttons": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
"tmp",
".tmp",
".bundle",
".sass-cache"
],
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"line_padding_bottom": 1,
"line_padding_top": 1,
"soda_classic_tabs": true,
"tab_size": 4,
"theme": "Soda Light.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"word_wrap": true,
"wrap_width": 200
}
插件:
- 埃米特
- 地沟
- 包控制
- PyV8
- 无礼
- SFTP
- 侧边栏增强功能
- 主题-苏打水
"trim_automatic_white_space": false,
默认值为
true
,设置后,会在将插入符号移出行时自动缩进添加的空白。请提问并添加首选项->设置-用户
文件的内容,同时列出您安装的所有插件。你的“期望”行为是我在ST2和ST3中得到的。啊,很高兴知道,会的。你帮我省了很多很多击键。太好了,谢谢!