Closed Unknow0059 closed 3 years ago
No, it is not supported. Nano has no access to the Windows clipboard. Normally it is the terminal driver that does that, which means inside CMD you may only select text and copy it by right-clicking. Note CMD itself does not support non-rectangle selection.
Not only is this the case on Windows, it is also what people do on Linux. See https://www.nano-editor.org/dist/v5/faq.html#4.4.
Ok.
What about code highlighting? As described here.
Also, I just tried ^+V (Ctrl Shift V) and it worked just fine.
It is supported, but the bundled .nanorc
contains Unix paths which you have to replace with Windows paths such as D:/nano/syntax/*.nanorc
.
Where exactly should the bundled .nanorc
be placed in order for nano to recognize it?
In the archive, it is placed above the directory that comes with nano's bin and share folders. Doesn't seem to be recognized there. Nor on %USERPROFILE% for that matter.
Also, if .nanorc is supported, how come set
isn't? If I try set wordwrap
I get a Not supported on Windows
error.
.nanorc.
should be placed in your home directory. On my computer it is C:/Users/lhmouse
. You should ensure it is named .nanorc
, not .nanorc.nanorc
or .nanorc.text
whatsoever, as explorer does not display extensions by default.
Where did you get the Not supported on Windows
error? It only happens when you attempt to suspend nano (with Ctrl-Z) or to execute a command (with Ctrl-T, or Ctrl-R followed by Ctrl-X).
As previously mentioned, .nanorc
is not recognized in %USERPROFILE%, which is an environment variable that on my computer expands to C:/Users/
followed by a folder named after my Windows account's name.
Error:
The fact that I have a new buffer opened instead of a file does not make a difference.
I suppose you run nano with admin privilege? Then %ALLUSERSPROFILE%/.nanorc
is used instead. See https://github.com/lhmouse/nano-win/commit/4e3ff45b6046b17937166d1b98355de6828307ac#diff-3e04e056edbdc0f772b0ffd1c93cef1187209f37276d40d2a281d9b989398a73R41.
Rationale: If you run nano
on Linux with a non-root user, then $HOME/.nanorc
is loaded. But if you run sudo nano
then the effective UID is zero (root) and /root/.nanorc
is loaded instead.
Placing .nanorc
in %ALLUSERSPROFILE% doesn't seem to have had any effect.
Of course, I've made sure that some settings from there have been uncommented.
Specifically the ones from under:
## Paint the interface elements of nano. These are examples;
Which would be easily viewed when in effect.
I have no idea. Perhaps you can build nano locally, and use GDB to set breakpoints on the have_nanorc()
and parse_one_nanorc()
functions, to find out whether the global variable nanorc
is assigned a valid path.
You cannot use the execute command feature to turn on/off options. To enable/disable soft wrapping. press Alt-$ i.e. Alt-Shift-4 on an American keyboard.
This week I had been hibernating my computer instead of shutting it down so I wouldn't lose my virtual desktops. Yesterday I was having some issues with explorer.exe
, Virtual Desktops, and fullscreen programs, so I finally restarted my computer.
Today I tried running nano-win again with .nanorc
in %USERPROFILE% and the settings applied as expected. It seems the lack of shutdown had been causing issues here, too.
I have the environment variable %HOME% set to a folder within that directory in the hopes that I can keep all my Unix files in one place instead of scattered in Users. For that reason it is inconvenient that nano-win ignores the variable, but I am very glad that the settings are just working now.
HOME
isn't a standard variable on Windows so it's probably unreliable.
I suggested because vim on windows uses it. Nevermind, however. git bash also uses it.
Is this supported, or am I missing something?
Expected:
Occurred: