Permalink
Browse files

Limit amount of indent for soft wrapped line comments

We now re-use the line’s indent and add at most 4 more spaces. This should avoid the bad cases with long lines causing the comment to be wrapped with a problematic small width.
  • Loading branch information...
1 parent 4923424 commit 69e84e16f3102da8772e9e76cf63bc30fa53b9fd @sorbits sorbits committed Jul 21, 2013
@@ -11,7 +11,7 @@
<key>indentedSoftWrap</key>
<dict>
<key>format</key>
- <string>${0/\S/ /g}</string>
+ <string>${0/(\s*)(.{,4}).*/$1${2/./ /g}/}</string>
<key>match</key>
<string>.*(')\s+</string>
</dict>
@@ -11,7 +11,7 @@
<key>indentedSoftWrap</key>
<dict>
<key>format</key>
- <string>${0/\S/ /g}</string>
+ <string>${0/(\s*)(.{,4}).*/$1${2/./ /g}/}</string>
<key>match</key>
<string>.*(\*)\s+</string>
</dict>
@@ -11,7 +11,7 @@
<key>indentedSoftWrap</key>
<dict>
<key>format</key>
- <string>${0/\S/ /g}</string>
+ <string>${0/(\s*)(.{,4}).*/$1${2/./ /g}/}</string>
<key>match</key>
<string>.*(`)\s+</string>
</dict>
@@ -11,7 +11,7 @@
<key>indentedSoftWrap</key>
<dict>
<key>format</key>
- <string>${0/\S/ /g}</string>
+ <string>${0/(\s*)(.{,4}).*/$1${2/./ /g}/}</string>
<key>match</key>
<string>.*(@|\\\\|--|\.\.|!|%%?)\s+</string>
</dict>
@@ -11,7 +11,7 @@
<key>indentedSoftWrap</key>
<dict>
<key>format</key>
- <string>${0/\S/ /g}</string>
+ <string>${0/(\s*)(.{,4}).*/$1${2/./ /g}/}</string>
<key>match</key>
<string>.*(##?)\s+</string>
</dict>
@@ -11,7 +11,7 @@
<key>indentedSoftWrap</key>
<dict>
<key>format</key>
- <string>${0/\S/ /g}</string>
+ <string>${0/(\s*)(.{,4}).*/$1${2/./ /g}/}</string>
<key>match</key>
<string>.*(;)\s+</string>
</dict>
@@ -11,7 +11,7 @@
<key>indentedSoftWrap</key>
<dict>
<key>format</key>
- <string>${0/\S/ /g}</string>
+ <string>${0/(\s*)(.{,4}).*/$1${2/./ /g}/}</string>
<key>match</key>
<string>.*(//?)\s+</string>
</dict>

0 comments on commit 69e84e1

Please sign in to comment.