An open API service indexing awesome lists of open source software.

https://github.com/e-zk/vis-shebang

vis plugin to set syntax highlighting based on file shebangs
https://github.com/e-zk/vis-shebang

editor plugin vis

Last synced: 5 months ago
JSON representation

vis plugin to set syntax highlighting based on file shebangs

Awesome Lists containing this project

README

          

vis-shebang
============

[vis](https://github.com/martanne/vis) plugin to set syntax based on [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)).

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 = {
[] =
}

Where `` is the syntax you wish to set vis to, given your file starts with ``.
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')