Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added comments to tmLanguage and tmPreferences #39

Closed
wants to merge 2 commits into from

2 participants

@ianneub

This adds a bit of readability to the xiki code (at least I find it helpful).

Any lines beginning with // will be treated as a comment.

The command key super+/ will toggle a "// " at the beginning of the current line.

ianneub added some commits
@ianneub ianneub Added “comments” to the language and enabled super+/ to comment and u…
…ncomment lines. This adds a bit of readability to the xiki code (at least I find it helpful).
c7ebbee
@ianneub ianneub Switched comments to use // and not # 571fae9
@lunixbochs
Owner

# is used for comments in the command-line, so it still has a place in the language if you're running commands.

@ianneub

@lunixbochs I changed the comment symbol to //. Also I've set it to only comment a line if // is the first character of the line.

When I try to execute a line that starts with // it doesn't seem to do anything. So that's good.

Do you think that is acceptable?

@lunixbochs
Owner

I still feel the comments should be # because that's standard in shell.

bash-4.3$ echo #asdf

bash-4.3$ echo //asdf
//asdf
@ianneub ianneub closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 5, 2013
  1. @ianneub

    Added “comments” to the language and enabled super+/ to comment and u…

    ianneub authored
    …ncomment lines. This adds a bit of readability to the xiki code (at least I find it helpful).
  2. @ianneub
This page is out of date. Refresh to see the latest.
Showing with 30 additions and 0 deletions.
  1. +6 −0 Xiki.tmLanguage
  2. +24 −0 Xiki.tmPreferences
View
6 Xiki.tmLanguage
@@ -46,6 +46,12 @@
<key>name</key>
<string>comment.operator.path.escape</string>
</dict>
+ <dict>
+ <key>match</key>
+ <string>^//.*</string>
+ <key>name</key>
+ <string>comment</string>
+ </dict>
</array>
<key>scopeName</key>
<string>xiki</string>
View
24 Xiki.tmPreferences
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//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>xiki</string>
+ <key>settings</key>
+ <dict>
+ <key>shellVariables</key>
+ <array>
+ <dict>
+ <key>name</key>
+ <string>TM_COMMENT_START</string>
+ <key>value</key>
+ <string>// </string>
+ </dict>
+ </array>
+ </dict>
+ <key>uuid</key>
+ <string>AF8D3707-011E-11E2-9804-705681C14B6F</string>
+</dict>
+</plist>
Something went wrong with that request. Please try again.