How can I get a custom enviornment variable in my .nanorc file. I need it for syntax highlighting.
I want $XDG_CONFIG_HOME/.config/nano/*.nanorc to be my nanorc files.
Sometimes I use different nanorc's in from different config directories for changing the syntax.I just want to change one variable, not my nanorc file.
How can I include a variable in my nanorc
23 views Asked by RandomCoder368 At
1
Use
vim?In all seriousness though, I cannot find any reference to 'variable' or 'environment' in the
nanomanpages.As a workaround you could copy your
nanorcto$XDG_CONFIG_HOME/.config/nano/nanorc1and change the appropriate line in the secondary file.add something like:
to your
~/.bashrcThis change will load automatically on new shell (terminal) opening but the first time you may need to. ~/.bashrcthen for the primary configuration just start nano with
nanoand for alternate configuration usenano1This configuration would also allow you to alter anything else in the secondary config and have it only affect the other-syntax-styled configuration.
Maybe you have syntax highlight config for
pythonand another forrubyso you want the header-bar to be green in thepythonconfig and red in therubyconfig as an additional visual indicator of which syntax configuration you launched a particular instance ofnanowith