https://github.com/curlpipe/vim-sahl
Vim plugin to add syntax highlighting and automatic compilation for the SAHL language
https://github.com/curlpipe/vim-sahl
Last synced: about 1 year ago
JSON representation
Vim plugin to add syntax highlighting and automatic compilation for the SAHL language
- Host: GitHub
- URL: https://github.com/curlpipe/vim-sahl
- Owner: curlpipe
- License: mit
- Created: 2020-04-23T16:48:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-25T20:20:38.000Z (about 6 years ago)
- Last Synced: 2025-01-28T18:36:11.998Z (over 1 year ago)
- Language: Vim script
- Size: 1.95 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vim-sahl
> A simple vim plugin that adds highlighting and indentation as well as automatic compilation on save
### Installation
In this repository, you will find two files, one in the syntax folder which can be put into `~/.vim/syntax/sahl.vim` and another file in the sahl folder which can be placed in `~/.vim/sahl/sahl.vim`
You can add this plugin to your readme by simply adding `source ~/.vim/sahl/sahl.vim` and if you placed the syntax file in the correct place, that will automatically be applied to every sahl file you edit.
You can clone the repository directly into your vim folder by simply running the command `git clone https://github.com/curlpipe/vim-sahl ~/.vim/` and the plugin will be ready to be added to your .vimrc file
### Disabling automatic compilation
In the `sahl.vim` file that is located in `~/.vim/sahl/sahl.vim` you can disable the automatic compilation that occurs in the background by simply commenting out the line `au BufWritePost *.sahl silent exec "!sahl -s "` and when you save your sahl files they will no longer be converted to html automatically.
### Changing the command to compile
To change the command to compile with sahl, e.g. you don't have the binary or have a specific path where the binary is located, you can edit the line `au BufWritePost *.sahl silent exec "!sahl -s "` and change the command after the `!` symbol. If you don't have the binary you can simply change the line to `au BufWritePost *.sahl silent exec "!ruby /path/to/sahl.rb -s "` and when you reload your vim the changes will be applied.