Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vim-just installation instructions to readme #835

Merged
merged 3 commits into from
May 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,27 @@ curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -

=== Vim

For vim, you can put the following in `~/.vim/filetype.vim`:
==== `vim-just`

The [vim-just](https://github.com/NoahTheDuke/vim-just) plugin provides syntax highlighting for justfiles.

Install it with your favorite package manager, like [Plug](https://github.com/junegunn/vim-plug):

```vim
Plug 'NoahTheDuke/vim-just'
```

Or with Vim's built-in package support:

```
mkdir -p ~/.vim/pack/vendor/start
cd ~/.vim/pack/vendor/start
git clone https://github.com/NoahTheDuke/vim-just.git
```

==== Makefile Syntax Highlighting

Vim's built-in Makefile syntax highlighting isn't perfect for justfiles, but it's better than nothing. You can put the following in `~/.vim/filetype.vim`:

```vimscript
if exists("did_load_filetypes")
Expand All @@ -158,7 +178,7 @@ augroup filetypedetect
augroup END
```

You can add the following to a individual justfile to enable make mode on a per-file basis:
Or add the following to a individual justfile to enable make mode on a per-file basis:

```
# vim: set ft=make :
Expand Down