From 4ed63f886f06d688c3ce8e1e8307999c5b5fb4d4 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 20 May 2021 15:07:50 -0500 Subject: [PATCH] Add `vim-just` installation instructions to readme (#835) --- README.adoc | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 1cde04f..5d550f3 100644 --- a/README.adoc +++ b/README.adoc @@ -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") @@ -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 :