Highlight current line

Michael Smith smithm at netapps.com.au
Wed Nov 29 11:52:34 CET 2006


On Wed, 29 Nov 2006 11:27:39 +0100
<Ludger.Papenkort at dlr.de> wrote:

> Hallo,
> 
> how is it possible to highlight the current line ?
> 
> Sometimes it is very usefull to highlight the line where the cursor is.
> This feature would help to compare the text (numbers, tables or what
> else) in the editor window with original text written on paper. You
> could go through the text line by line with the cursor-down-key an
> compare the highlighted line with the original.
> 
> Is there a possibility to do that with a macro ?

Yes

define select_line
{
  start = search("\n",$cursor,"backward")
  end = search("\n",$cursor,"forward")
  select(start + 1,end + 1)
}

It could do with some refinement though. I don't think it works well on the first or last line of a file.

No doubt others will post improved versions from their own collections shortly :)
-- 
Michael Smith
Network Applications
www.netapps.com.au   | +61 (0) 416 062 898
Web Hosting          | Internet Services
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://www.nedit.org/pipermail/discuss/attachments/20061129/dc5c0217/signature.bin


More information about the Discuss mailing list