TextMate: removing trailing spaces and saving

I use a script to remove trailing spaces and save the file.

The problem is that all my code summaries expand when I use them. How do I change a command to keep code folds?

+4
source share
1 answer

You can use foldingStartMarker and foldingStopMarker to indicate folds on TextMate.

To define a block that starts with {as the last non-spatial character in the string and stops with} as the first non-spatial character in the string, we can use the following patterns:

foldingStartMarker = '\{\s*$'; foldingStopMarker = '^\s*\}'; 

pressing the F1 key resets the existing code folds.

Link: http://manual.macromates.com/en/navigation_overview#collapsing_text_blocks_foldings

+2
source

Source: https://habr.com/ru/post/1390001/


All Articles