[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] feature request -- shaded groups of lines
From: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] feature request -- shaded groups of lines |
Date: |
Thu, 22 Mar 2018 10:17:03 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
Op 20-03-18 om 23:04 schreef Michael Williamson:
> It would be helpful for me sometimes if nano could highlight horizontally,
> with background shading, groups of 3 or 4 rows alternating with un-highlighted
> groups of rows. That would make it easier to scan across tables of numbers,
> for example.
Interesting. Do you know of any other editor that has a similar feature?
But, if it's only sometimes that you need this feature, you can help
yourself. First add the following two lines to your ~/.nanorc:
syntax table
color ,blue "^:.*"
Then open the file that contains your tabular data:
nano --syntax=table yourdata
and type:
M-\ M-: - <Left> <Down> - <Left> <Down> - <Left> <Down>
: <Left> <Down> : <Left> <Down> : <Left> <Down> M-:
followed by a series of M-; until you reach end of file.
(It's not the same as a background hue over the full width of the
screen, but when your table is well-filled, it goes a long way.)
When you're done editing your data, you remove the extra characters:
M-R M-R ^. <Enter> <Enter> A ^S ^X
Instead of defining the macro and doing the replacements by hand,
you could bind two keys to strings with the relevant commands.
Benno
signature.asc
Description: OpenPGP digital signature
- [Nano-devel] feature request, Michael Williamson, 2018/03/20
- Re: [Nano-devel] feature request -- shaded groups of lines,
Benno Schulenberg <=