Make rc files to have .sh or .zsh extension? #15

Open
miohtama opened this Issue Jan 29, 2013 · 4 comments

Comments

Projects
None yet
3 participants
Owner

miohtama commented Jan 29, 2013

This way nano etc. all highly superior editors would give you syntax highlighting?

@ghost ghost assigned ztane Jan 29, 2013

Collaborator

ztane commented Jan 29, 2013

Not only, but I want dependency/module system in place for everything... instead of the current stupid sequential numbering scheme.

Instead of renaming all the files just to get the highlighting shouldn't your ~/.nanorc have something like:

syntax "sh" "$"

Unless nano supports modelines - then you can just add a modeline somewhere to force the syntax.

Owner

miohtama commented Jan 30, 2013

@opendevnet There are plenty of editors out there supporting .sh syntax coloring, but not modelines. I suggest aim for a generic solution, not an editor specific solution.

Seems my earlier comment gotten partially eaten. If your ~/.nanorc had something like:

syntax "sh" "[regex that turns on the syntax when in ztanesh files]$"

it should work no? So e.g. with nano you can edit your xorg.conf and get highlighting simply by putting somthing like

syntax "sh" "xorg.conf$"

I don't use nano much anymore but I'm pretty sure it worked that way once upon a time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment