Sublime Text knows to use //
for comments in files with the extension .js
and #
for files with the extension .sh
. But I have many files (such as /etc/hosts
) which require a particular comment character, but have no extension that Sublime Text can recognize.
Is there a way, on a per-file basis, to tell Sublime Text “This is a file of type X; when I press Ctrl-/
, please comment the selected lines in this file with the comment string Y”?