최근 CSS에 대한 숭고한 텍스트 블록 설명을 계속하기 위해 훌륭한 스크립트를 사용하여 게시물을 발견했습니다. Here. 환경 고유의 키 바인딩 파일에 추가하면 매력처럼 작동합니다. 그러나 라텍스 설명과 함께 사용하려고 변경하면 (예 : *를 %로 대체) 작동하지 않습니다.라텍스 Sublime Text 2의 구문 특정 블록 주석
원본 코드 :
{"keys": ["enter"], "command": "insert", "args" : {"characters": "\n * "},
"context":
[
{"key": "selection_empty", "operator": "equal", "operand": true},
{"key": "preceding_text", "operator": "regex_contains",
"operand": "\\/\\*\\*$", "match_all": true}
]
},
{"keys": ["enter"], "command": "insert", "args" : {"characters": "\n* "},
"context":
[
//{"key": "selection_empty", "operator": "equal", "operand": true},
{"key": "preceding_text", "operator": "regex_contains",
"operand": "^[\t ]*\\*[^\\/]", "match_all": true}
]
},
내 코드 :
{"keys": ["enter"], "command": "insert", "args" : {"characters": "\n % "},
"context":
[
{"key": "selection_empty", "operator": "equal", "operand": true},
{"key": "preceding_text", "operator": "regex_contains",
"operand": "\\/\\%\\%$", "match_all": true}
]
},
{"keys": ["enter"], "command": "insert", "args" : {"characters": "\n % "},
"context":
[
//{"key": "selection_empty", "operator": "equal", "operand": true},
{"key": "preceding_text", "operator": "regex_contains",
"operand": "^[\t ]%\\%[^\\/]", "match_all": true}
]
},
'작동하지 않음'을 정의하십시오. '*'는'선행하는 토큰을 0 번 이상 매치'하는 것을 의미하는 수량 화기이다. 그것은 또한 상당히 모호합니다. 나는이 스크립트가 무엇을 해야하는지를 의미합니다. 두 가지 경우에 대한 정보를 입력 할 수 있습니까? – HamZa
블록 주석 섹션 내의 각 줄마다 %를 추가해야합니다. 즉, 주석 문자 (*에 css, %는 latex)가 있는지 확인합니다. 에 의해 작동하지 않는, 그것은 아무것도 추가 의미. 그러나 처음에는 *가 추가됩니다. – Nick
라텍스의 의견은 무엇입니까? 그것은'/ % 이것은 주석/%입니까? '입니까? – HamZa