4

I have installed this version of Nano using:

winget install GNU.nano

Now, I'm trying to figure out where to put the config files for nano to read them. Below is the list of places where I've tried putting the file:

  • %ProgramData%\.nanorc
  • %ProgramData%\nano.rc
  • %UserProfile%\.nanorc
  • %UserProfile%\nano.rc
  • %UserProfile%\Documents\.nanorc
  • %UserProfile%\Documents\nano.rc
  • %LocalAppData%\Microsoft\WinGet\Packages\GNU.Nano_Microsoft.Winget.Source_8wekyb3d8bbwe\.nanorc
  • %LocalAppData%\Microsoft\WinGet\Packages\GNU.Nano_Microsoft.Winget.Source_8wekyb3d8bbwe\nano.rc

PS: I used set tabsize 4 as my test config. Also, nano -T 4 ./file works fine.

7
  • Put your config files in c:\programdata
    – anon
    Commented Dec 23, 2022 at 0:50
  • @John That also didn't work
    – SepSol
    Commented Dec 23, 2022 at 0:56
  • Try C:\Users\jusername\Documents
    – anon
    Commented Dec 23, 2022 at 0:57
  • @John Didn't work either
    – SepSol
    Commented Dec 23, 2022 at 1:00
  • Thanks. What this means is that your program is incompatible with Windows. The locations I gave you are bland neutral locations.
    – anon
    Commented Dec 23, 2022 at 1:01

2 Answers 2

1

To install Nano properly on Windows, please follow this answer.

From the Nano docs themselves:

#-----------------------------------------------------------------------
# Notes:
#       1. Whith normal shell privilege, .nanorc is loaded from:
#          "%USERPROFILE%\.nanorc"
#
#       2. With Administrator privilege, .nanorc is loaded from:
#      "%ALLUSERSPROFILE%\.nanorc".
#
#       3. The systemwide nanorc is loaded from:
#          "%ALLUSERSPROFILE%\nanorc".
#
#       4. In Windows-10, the locations are:
#                       ALLUSERSPROFILE   C:\ProgramData
#                       USERPROFILE       C:\Users\<username>

Make sure to add this to your "User" and "Machine" (System) PATHs.

0

Put nano.rc file from installation directory to your $HOME directory ( C:\users\username)

2
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Dec 25, 2022 at 19:16
  • I've already tried that and it didn't work. I've listed that above as %UserProfile%\nano.rc
    – SepSol
    Commented Dec 26, 2022 at 2:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .