Skip to content

Commit

Permalink
Adding local_validate
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Hamiter committed Nov 23, 2011
1 parent 4851da9 commit 9115d40
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,30 @@ Activate to generate a UUID.
I've added this to my User Key Bindings (⌘-⇧-u on a Mac):

{ "keys": ["super+shift+u"], "command": "generate_uuid" }


local_validate.py
=================

Using the Mac OS X application *Validator S.A.C.* (separate installation required, see below), local_validate.py will locally validate the current XHTML / HTML file.

![local_validate screenshot](https://github.com/ehamiter/Sublime-Text-2-Plugins/raw/master/local_validate.png)


Installation
------------

1. Download [Validator S.A.C.](http://habilis.net/validator-sac/) and copy to your Applications folder.
2. Copy **[local_validate.py](https://github.com/ehamiter/Sublime-Text-2-Plugins/raw/masterlocal_validate.py)** into your ST2 User packages folder *(Sublime Text 2 > Preferences > Browse Packages... > User)*

After installation, your browser may prompt you to select the default handler for `x-validator-sac`. Select *Validator S.A.C.*


Usage
-----

Activate to locally validate the current XHTML / HTML file.

I've added this to my User Key Bindings (⌃-⌥-v on a Mac):

{ "keys": ["ctrl+alt+v"], "command": "local_validate" }
Binary file added local_validate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions local_validate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import sublime_plugin

class LocalValidateCommand(sublime_plugin.TextCommand):
def run(self,edit):
full_link = "x-validator-sac://open?uri=%s" % self.view.file_name()
self.view.window().run_command('open_url', {"url": full_link})

0 comments on commit 9115d40

Please sign in to comment.