^L
Select current line

Script key: Select current line

Posted by @bobmurdock

Install

Details

Label ^L
Voice Over Select current line
Script
// Select current line
// based on shirose_jp scripts (thanks!)

var line_range = getSelectedLineRange();

var eol = line_range[0] + line_range[1];
if ( getTextInRange( eol - 1, 1 ) === '\n' ) {
  eol = eol - 1;
}


setSelectedRange( line_range[0], eol - line_range[0] );

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus