Skip to content

Commit

Permalink
Added Comment Bookmarks and fixed toggle comment
Browse files Browse the repository at this point in the history
use:
// ! text
or
/** ! text*/
To create a Bookmark
  • Loading branch information
Zinggi committed Jan 30, 2013
1 parent 697c6f6 commit a6bbb31
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Boockmark comments.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Comment Bookmark</string>
<key>scope</key>
<string>comment</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>1</integer>
<key>symbolTransformation</key>
<string>
s/^\S+\s*//g # strip opening punctuation + spacing
s/^[^!].*//g # remove all comments that DON'T begin with a !
s/^!\s*//g # strip ! and subsequent spaces (if any)
s/^(.*?)\n.*/$1/g # keep only 1st line (in case of multiline comment)
s/\W*$//g
</string>
</dict>
<key>uuid</key>
<string>7fdae8f0-c6c7-11e1-9b21-0800200c9a66</string>
</dict>
</plist>
36 changes: 36 additions & 0 deletions Comments.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Comments</string>
<key>scope</key>
<string>source.unrealscript</string>
<key>settings</key>
<dict>
<key>shellVariables</key>
<array>
<dict>
<key>name</key>
<string>TM_COMMENT_START</string>
<key>value</key>
<string>// </string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_START_2</string>
<key>value</key>
<string>/**</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_END_2</string>
<key>value</key>
<string>*/</string>
</dict>
</array>
</dict>
<key>uuid</key>
<string>A67A8BD9-A951-706F-9175-018DD4B52FD1</string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Feautures

* **goto declaration and back again** (F10, alt + left, right click menu or via 'Goto' -> 'UnrealScript Goto Declaration')

* **Add bookmarks to your comments** and navigate to them quickly via Ctrl + R (just write your comments like this: // ! text or /** ! text*/)

* **more coming...**


Expand Down

0 comments on commit a6bbb31

Please sign in to comment.