Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/earthly/earthly.vim
Earthfile syntax highlighting for vim
https://github.com/earthly/earthly.vim
earthly vim
Last synced: 3 days ago
JSON representation
Earthfile syntax highlighting for vim
- Host: GitHub
- URL: https://github.com/earthly/earthly.vim
- Owner: earthly
- License: mpl-2.0
- Created: 2020-10-29T16:13:09.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-02T15:57:54.000Z (8 months ago)
- Last Synced: 2024-04-02T17:01:27.134Z (8 months ago)
- Topics: earthly, vim
- Language: Vim Script
- Homepage:
- Size: 124 KB
- Stars: 36
- Watchers: 6
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Earthfile syntax highlighing
Syntax highlighting for [Earthly](https://earthly.dev) Earthfiles for Vim.
For an introduction of Earthly see the [Earthly GitHub repository](https://github.com/earthly/earthly) or the [Earthly documentation](https://docs.earthly.dev).
## Requirements
- Install [vim](https://www.vim.org/download.php) or [neovim](https://neovim.io/)
- Enable syntax highlighting:
Update your `~/.vimrc` file to include:
```bash
syntax on
```## Installation Notes
Use your favorite plugin manager:
### Vim-Plug
Using the [vim-plug](https://github.com/junegunn/vim-plug) plugin manager, add:
Plug 'earthly/earthly.vim', { 'branch': 'main' }
Then run
:PlugInstall
### Pathogen
git clone [email protected]:earthly/earthly.vim.git ~/.vim/bundle/earthly
### Manual
To install manually, copy `syntax/Earthfile.vim` to `~/.vim/syntax/Earthfile.vim`.
Now write the following into the file at `~/.vim/ftdetect/Earthfile.vim`
```vim
au BufRead,BufNewFile Earthfile set filetype=Earthfile
au BufRead,BufNewFile build.earth set filetype=Earthfile
```#### Neovim
Neovim users will have to change the `~/.vim/` prefix in the above steps to `~/.config/nvim`.
## Screenshot
![Java example Earthfile in Vim](Screenshot.png)