5

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.

SepSol
  • 81

2 Answers2

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.

not2qubit
  • 2,651
  • 4
  • 34
  • 45
0

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