0

One bash script is named without file extension, NERD Commenter works fine.

Another bash script name is aaa.sa. NERD Commenter is using -- to comment a line instead of #. File syntax highlight is also wrong.

How to fix this?

enter image description here

4

.sa files are detected by Vim as Sather files.

You can check in Vim by issuing :verbose set filetype?.

If you want to have your own filetypes detected matching a particular pattern, please check the faq (also other questions in the same section might be relevant for you).

Note, I find using the extension sa for bash files confusing and un-intuitive.

| improve this answer | |
  • Since I don't use Sather file, I add below line to .vimrc to force .sa show as sh. <br/> au BufRead,BufNewFile *.sa set filetype=sh – Fisher Jan 10 '18 at 11:07
  • Why would you use sa as extension for shell files? – Christian Brabandt Jan 12 '18 at 19:05
  • It's not an extension, sa is stand-alone. And . is easier than _ to type. – Fisher Jan 16 '18 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.