㎝ Com
Critic markup comment

Script key: Critic markup comment

Posted by wrk3

Install

Details

Label ㎝ Com
Voice Over Critic markup comment
Script
// Surround selection with Critic Markup comment syntax, 
// or insert syntax if no selection.
// Place cursor to enter comment if no selection.

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]+6,0);
}

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus