Skip to content

vis plugin to set syntax highlighting based on file shebangs

Notifications You must be signed in to change notification settings

e-zk/vis-shebang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

vis-shebang

vis plugin to set syntax based on shebang.

Please open an issue if you encounter any bugs.

example configuration

vis-shebang uses a global variable that maps shebangs to syntaxes, in the following format.

shebangs = {
    [<shebang>] = <syntax>
}

Where <syntax> is the syntax you wish to set vis to, given your file starts with <shebang>.
For example, this configuration sets files with the shebang #!/bin/sh to bash syntax:

shebangs = {
    ["#!/bin/sh"] = "bash"
}

Multiple shebangs can be defined at a time:

shebangs = {
    ["#!/bin/sh"] = "bash",
    ["#!/usr/bin/env python3"] = "python"
}

installation

Clone this repo to $VIS_PATH/plugins/vis-shebang and a require line to visrc.lua:

require('plugins/vis-shebang')

About

vis plugin to set syntax highlighting based on file shebangs

Topics

Resources

Stars

Watchers

Forks

Languages