nano-devel
[Top][All Lists]
Advanced

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

Global tabgives and spacestotab config option


From: Peter Magnusson
Subject: Global tabgives and spacestotab config option
Date: Mon, 31 May 2021 18:46:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0


Hello nano-devel,

Im have been using nano/(pico) since over 20 years when I switched from
AmigaOS to Linux. It was kinda similar to the editor CygnusEd (ced).

One thing has annoyed me but I never put time into try to fix it until
recently. The problem is that tabstospaces always is active even that it
isnt so in the cfg.

If I ^K a line and ^U the tab will still be there.
If I do the same with the mouse and cut and paste it will do tabstospaces.
I like tabs and want to be able to copy text with tabs from one host to
and other host without acutally moving the file.

I use xterm and did some research and was hoping that if I put this in
.Xresources it would help but it didnt:

XTerm*selectToClipboard: true
XTerm*highlightSelection: false
XTerm*trimSelection: false
XTerm*ttyModes: -tabs

Then noticed that there is a tabgives command so now I got nano 5.6.1
and try to get tabgives to work but cant figure out the syntax to
make tabgives always active on everything. Not even the examples in
/etc/nanorc works as they will give errors like this if I enable
them:

Error in /etc/nanorc on line 258: Could not find syntax "python" to extend

## If <Tab> should always produce four spaces when editing a Python file,
## independent of the settings of 'tabsize' and 'tabstospaces':
# extendsyntax python tabgives "    "

## If <Tab> should always produce an actual TAB when editing a Makefile:
# extendsyntax makefile tabgives "      "

both these files exists:
/usr/share/nano-syntax-highlighting/python.nanorc
/usr/share/nano-syntax-highlighting/makefile.nanorc
It doesnt help to do unset tabstospaces either.

How do I do something like this?

extendsyntax * tabgives "       "
tabgives * "    "
tabgives "      "

Im not alone with this problem, there is at least one more that have the
exactly the same problem:
https://discuss.getsol.us/d/4837-terminal-nano-converts-tab-to-ordinary-space
I think its a good idea, can nano have a spacestotab config option?

The             world           needs           more tabs.

/Peter




reply via email to

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