Skip to content

Commit

Permalink
Merge pull request #8 from Bogardo/master
Browse files Browse the repository at this point in the history
Menu option, fixed JSON config file, added JSON versions for tmLanguage and tmPreference
  • Loading branch information
martinssipenko committed May 7, 2014
2 parents daa77a9 + 76dfcac commit f6bdb8b
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Main.sublime-menu
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
[
{
"caption": "Tools",
"id": "tools",
"children":
[
{
"command": "open_hosts_file",
"caption": "Open Hosts File"
}
]
},
{
"caption": "Preferences",
"mnemonic": "n",
Expand Down
1 change: 0 additions & 1 deletion SublimeHostsEdit.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
//PATH to `hosts` file depending on system
"windows_hosts_file_location": "C:/Windows/System32/drivers/etc/hosts",
"linux_hosts_file_location": "/etc/hosts",
"osx_hosts_file_location": "/private/etc/hosts"
Expand Down
13 changes: 13 additions & 0 deletions syntax/Comments.JSON-tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Comments",
"scope": "source.hosts-config",
"settings": {
"shellVariables": [
{
"name": "TM_COMMENT_START",
"value": "# "
}
]
},
"uuid": "E6CBDBA3-30DC-4EBD-B4DD-2527FBEED52A"
}
23 changes: 23 additions & 0 deletions syntax/Host Config.JSON-tmLanguage
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"fileTypes": [
"hosts"
],
"name": "Hosts Config",
"patterns": [
{
"captures": {
"1": {
"name": "punctuation.definition.comment.source.hosts-config"
}
},
"name": "comment.line.number-sign.source.hosts-config",
"match": "(#).*$\\n?"
},
{
"name": "constant.source.hosts-config",
"match": "^[\\d|\\.]+"
}
],
"scopeName": "source.hosts-config",
"uuid": "783C4FE3-EF25-41F2-9AF4-B6094E9927A2"
}
2 changes: 1 addition & 1 deletion syntax/Host Config.tmLanguage
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?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">
<!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>fileTypes</key>
Expand Down

0 comments on commit f6bdb8b

Please sign in to comment.