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
- Host: GitHub
- URL: https://github.com/e-zk/vis-shebang
- Owner: e-zk
- Created: 2020-03-18T11:23:05.000Z (over 6 years ago)
- Default Branch: trunk
- Last Pushed: 2022-08-27T05:11:12.000Z (almost 4 years ago)
- Last Synced: 2025-07-14T00:08:29.567Z (12 months ago)
- Topics: editor, plugin, vis
- Language: Lua
- Homepage:
- Size: 6.84 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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')