nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] Better tabstospaces support


From: markweston
Subject: Re: [Nano-devel] Better tabstospaces support
Date: Fri, 11 May 2018 21:45:38 +0300
User-agent: Roundcube Webmail/1.3.6

On 2018-05-11 18:40, Benno Schulenberg wrote:
Op 10-05-18 om 12:42 schreef address@hidden:
First of all, these new behaviours should only apply when:
1. ISSET(TABS_TO_SPACES)
2. Cursor is on a multiple of tabsize (0 is a multiple too)
3. All characters before cursor are spaces

Here's the list:
1. If there are >= tabsize spaces behind cursor,
   Left should move cursor left by tabsize spaces
2. If there are >= tabsize spaces ahead of cursor,
   Right should move cursor right by tabsize spaces.

What's the use case?  When do you want to go somewhere in the
middle of contiguous whitespace?  What do you want to do there?

It's annoying. When tabstospaces is on, blocks of tabsize spaces should be treated as tabs.

3. If there are >= tabsize spaces behind cursor,
   Backspace should remove tabsize spaces instead of just one.
4. If there are >= tabsize spaces ahead of cursor,
   Delete should remove tabsize spaces instead of just one.

Use Shift+Tab instead.

It's annoying as well, for the same reason.

Would you merge the patch if I made one?

Because otherwise I have another patch idea, similar to that
"pipe selection to external program" feature you're guys working on.
On save, I want to be able to pipe all text to an external program
(without any prompt) and pass the filename and some nanorc values as arguments.
The external program could:
1. Strip trailing whitespace.
2. Convert tabs to spaces or vice versa depending if ISSET(TABS_TO_SPACES) and tabsize.
3. Remove trailing semicolons if it's a Lua/Python script.
4. Run gcc -fsyntax-only filename if it's a C file, add gcc diagnostic comments (something like //gcc: main.c:2:5: error: 'what' undeclared (first use in this function))
5. If //gcc: comments are already there then remove them



reply via email to

[Prev in Thread] Current Thread [Next in Thread]