Vim Shebang Versions Save

Vim filetype detection by the she·bang line at file.

0.3

8 years ago
  • Add support of custom (and optional) pre_hook command while defining shebang patterns. This hook allow to execute user-defined command when pattern match found (#1). Thanks to @oryband

    AddShebangPattern  sh  ^#!/bin/sh  let\ g:is_sh=1
    
  • Set/unset the b:is_sh and b:is_bash variables according with shebang pattern, e.g. switching between multiple bash and sh buffers change syntax highlighting appropriately.