lhmouse / nano-win

GNU nano text editor for Windows [WARNING: The master branch is constantly rebased and force-pushed so don't expect it to be steady!! -end WARNING]
https://files.lhmouse.com/nano-win/
GNU General Public License v3.0
210 stars 25 forks source link

How to use all the nanorc files packed in the release build? #7

Closed ghost closed 6 years ago

ghost commented 6 years ago

Is there a way that I can reference all files under share\nano directory in %HOME%\.nanorc file, so where ever I will place nano.exe after that, it will all the syntax highlighting settings?

lhmouse commented 6 years ago

I am afraid this is not possible.

The path to all .nanorc files is absolute. On Linux for example the path is virtually relative to the root mount point so it should look like /usr/local/share/nano/*.nanorc.

I haven't tried relative paths but I don't think they will work reliably. You may want to put those .nanorc files in C:\Windows\nanorc or C:\Program Files\nanorc then reference them as follows:

include "C:/Windows/nanorc/*.nanorc"
ghost commented 6 years ago

Thanks, I copied the share\nano directory at C:\Users\Kasper\nanorc and created a file C:\Users\Kasper\.nanorc with the following line:

include "C:/Users/Kasper/nanorc/*.nanorc"

and syntax highlighting worked!

No highlighting for .bat or .cmd or ps1 files though. 😢

lhmouse commented 6 years ago

No highlighting for .bat or .cmd or ps1 files though. :cry:

Feel free to contribute. :>