[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] Feature Request/patch for visual converting whitespace
From: |
Mike Frysinger |
Subject: |
[Nano-devel] Feature Request/patch for visual converting whitespace |
Date: |
Thu, 4 Sep 2003 13:45:28 -0400 |
User-agent: |
KMail/1.5.3 |
i dont know if anyone has suggested/requested this before (i browsed the last
2 years of e-mails and didnt see any references ...), but i've always liked
being able to tell visually the difference between tabs and spaces ...
sometimes people will utilize 4 spaces instead of tabs in projects i work on
and rather than flipping through the code by hitting the arrows keys, i'd
like to pick out tabs quickly ... the same goes for trailing whitespace ...
i've included a small patch i whipped together ... its the first time i've
touched the nano code so i'm sure i missed something ...
basically it adds 2 new keywords to nanorc, 'tabconvert' and 'spaceconvert ...
it accepts either the ascii value (given as an integer) or a single
character. when you run nano, the tabs/spaces will be convereted to display
the specified characters ...
example:
.nanorc:
set tabconvert 187 # pretty font-dependent values ...
set spaceconvert 183
nano display:
src_install()·{
» doins·${S}/src/AtlasPalette·||·die
» egamesinstall·||·die
the dots are spaces while the >> character is a tab ...
shortcomings (and why i'm posting this ... if people dont like it i probably
wont fill out the possible extensions since the current patch suits me):
- you can only set via nanorc (no cmdline control/on the fly toggle)
i looked into adding a meta toggle, but it seems that nano has hit a
roadblock for adding new toggles ... it uses a bitmask field on a 32 bit
integer ... 32 toggles already exist thus unless the way toggles are
handled, nano won't have anymore toggles ?
- only converts tabs/spaces (doesnt do newline characters)
-mike
1.2.2-wsconvert.patch
Description: Text Data
pgpNy03B7399t.pgp
Description: signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nano-devel] Feature Request/patch for visual converting whitespace,
Mike Frysinger <=