Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/463.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos 升华文本2双引号字体样式取决于文件扩展名?_Macos_Sublimetext2 - Fatal编程技术网

Macos 升华文本2双引号字体样式取决于文件扩展名?

Macos 升华文本2双引号字体样式取决于文件扩展名?,macos,sublimetext2,Macos,Sublimetext2,双引号的自动配对是一个非常奇怪的问题,但仍然存在。问题在于,对于扩展名为.php、.html的文件,自动配对双引号的默认字体样式是不可解析的。为了说明我的意思,请注意左侧中双引号的字体样式。而对于.js和.css文件,双引号自动配对具有正确的字体样式,如右侧的所示 这一定是某个地方的设置,但我不太了解Sublime Text2(Mac OSX)。想法 在@JamieJag的大力帮助下,我已经解决了这个问题。Shift+“产生的是升华称之为“排版”的引号,而不是双引号,双引号可以作为PHP或HTM

双引号的自动配对是一个非常奇怪的问题,但仍然存在。问题在于,对于扩展名为.php、.html的文件,自动配对双引号的默认字体样式是不可解析的。为了说明我的意思,请注意左侧
中双引号的字体样式。而对于.js和.css文件,双引号自动配对具有正确的字体样式,如右侧的
所示

这一定是某个地方的设置,但我不太了解Sublime Text2(Mac OSX)。想法


在@JamieJag的大力帮助下,我已经解决了这个问题。Shift+“产生的是升华称之为“排版”的引号,而不是双引号,双引号可以作为PHP或HTML代码的一部分进行解析

为了解决这个问题,我注释掉了SublimiteText2首选项->键绑定->用户中的所有内容

我不清楚这些JSON对象中是否有一个或全部是造成问题行为的原因(尽管我猜第一个JSON看起来像罪犯),但到目前为止,仅仅注释掉整个数组就解决了我的问题

/*[

// Auto-pair typographical quotes
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "“$0”"}, "context":
   [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|”|;|\\}|$)", "match_all": true },
      { "key": "selector", "operator": "equal", "operand": "text", "match_all": true }
   ]
},
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "“${0:$SELECTION}”"}, "context":
   [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
      { "key": "selector", "operator": "equal", "operand": "text", "match_all": true }
   ]
},
{ "keys": ["\""], "command": "move", "args": {"by": "characters", "forward": true}, "context":
   [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^\\”", "match_all": true },
      { "key": "selector", "operator": "equal", "operand": "text", "match_all": true }
   ]
},
// Smart quotes before & after word
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "“$0"}, "context":
   [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^\\S", "match_all": true },
      { "key": "selector", "operator": "equal", "operand": "text", "match_all": true }
   ]
},
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "”$0"}, "context":
   [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\S", "match_all": true },
      { "key": "selector", "operator": "equal", "operand": "text", "match_all": true }
   ]
}

]*/

也许还有另一个插件改变了Shift的键图?你试过查看所有非默认软件包的键图吗?@JamieJag谢谢,你能告诉我怎么做吗?我是升华的新手,这是一个繁琐的过程-转到首选项->浏览软件包,在这里列出的每个文件夹中,你都可以识别为您已安装,请在“默认(OSX).升华键映射”中查找shift+“或shift+”。谢谢,该死,我在我的升华键映射文件中找不到任何内容。我只有几个包裹,所以没那么糟糕。我发现一个潜在的问题是,这些文件都是JSON格式的,而JSON是一种双引号正确呈现的文件类型。也许PHP文件不是UTF-8编码的?我甚至不知道你怎么称呼这些双引号。作为另一种解决方案,是否有办法将其他一些键组合分配给双引号?您似乎只需在设置中将“auto_match_enabled”设置为“false”,因为所有这些键映射似乎只有在设置为true时才会生效