我正在使用脚本删除尾随空格,然后保存文件。
问题是当我使用它时,我所有的代码折叠都会扩展。如何更改命令以保持代码折叠?
最佳答案
您可以使用foldingStartMarker 和foldingStopMarker 来指示TextMate 的折叠。
To define a block that starts with { as the last non-space character on the line and stops with } as the first non-space character on the line, we can use the following patterns:
foldingStartMarker = '\{\s*$';
foldingStopMarker = '^\s*\}';
按 F1 键将折叠存在的任何代码折叠。
引用:http://manual.macromates.com/en/navigation_overview#collapsing_text_blocks_foldings
关于TextMate:删除尾随空格并保存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8785204/