㎝ HiLt
Critic markup highlight with comment

Script key: Critic markup highlight with comment

Posted by wrk3

Install

Details

Label ㎝ HiLt
Voice Over Critic markup highlight with comment
Script
// Surround selection with Critic Markup substitution syntax, 
// or insert syntax if no selection.
// Place cursor in comment area if text was selected.

var sel = getSelectedText();
var selRange = getSelectedRange();

if (!sel || sel.length == 0) {
  setSelectedText("{====}{>><<}");
  setSelectedRange(selRange[0]+3,0);
}
else {
  setSelectedText("{=="+sel+"==}{>><<}");
  setSelectedRange(selRange[0]+selRange[1]+9,0);
}

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus