How to highlight Bash scripts in Vim?

Are you correctly giving the shell script a .sh extension? Vim’s automatic syntax selection is almost completely based on file name (extension) detection. If a file doesn’t have a syntax set (or is the wrong syntax), Vim won’t automatically change to the correct syntax just because you started typing a script in a given language.

As a temporary workaround, the command :set syn=sh will turn on shell-script syntax highlighting.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)