Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rhysd/vim-goyacc
Vim filetype support for goyacc
https://github.com/rhysd/vim-goyacc
go vim vim-plugin yacc
Last synced: 2 months ago
JSON representation
Vim filetype support for goyacc
- Host: GitHub
- URL: https://github.com/rhysd/vim-goyacc
- Owner: rhysd
- Created: 2017-05-12T07:54:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-10T14:35:31.000Z (over 6 years ago)
- Last Synced: 2024-11-01T11:51:29.451Z (2 months ago)
- Topics: go, vim, vim-plugin, yacc
- Language: Vim script
- Homepage: https://godoc.org/golang.org/x/tools/cmd/goyacc
- Size: 5.86 KB
- Stars: 22
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Vim Filetype Support for [goyacc][]
===================================[vim-goyacc][] is a filetype support for [goyacc][].
It provides standard YACC syntax highlight
and Go syntax highlight inside semantic action `{...}`. Default YACC syntax highlight attempts
to highlight the semantic action as C or C++, though.And this also provides Go's indentation using `runtime/indent/go.vim`. It provides more
pleasant auto indentation as editing Go source.![screen shot][]
Files whose names end with `.go.y` are detected as a file for goyacc. If you want to detect files
with your own rule, please write your `autocmd` in your vimrc.e.g.
```vim
" All files end with .y are detected as goyacc parser definition file.
autocmd BufNewFile,BufReadPost *.y setlocal filetype=goyacc
```Or write mode line at the bottom of your file as below.
```
/* vim: set ft=goyacc: */
```## How to Install
If you use Vim's default package management, please refer `:help load-plugins`. Clone this
repository with `git` to proper location in your filesystem.If you use your favorite Vim plugin manager like [vim-plug][], please follow the instruction
in its documentation.## License
This plugin was derived from Vim's standard YACC filetype support. Hence this plugin is
provided with the same license as Vim (Vim license). Please see `:help license` in Vim for
more detail.[goyacc]: https://godoc.org/golang.org/x/tools/cmd/goyacc
[vim-goyacc]: https://github.com/rhysd/vim-goyacc
[vim-plug]: https://github.com/junegunn/vim-plug
[screen shot]: https://github.com/rhysd/ss/blob/master/vim-goyacc/main.png?raw=true