From dbda69afa5a6fa1a5cccf50527da7bb680b9e861 Mon Sep 17 00:00:00 2001 From: Erik Corry Date: Mon, 13 Mar 2023 11:06:44 +0100 Subject: [PATCH] Update vim advice (#211) * Update vim advice for Vim 8 or later * fix --- vim/README.md | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/vim/README.md b/vim/README.md index c0ccfbb..327cae8 100644 --- a/vim/README.md +++ b/vim/README.md @@ -3,19 +3,31 @@ Toit Plugin to add syntax coloring for the Toit language. -If you are using Pathogen to manage your vim plugins, it's enough to -recursively copy this directory to a $HOME/.vim/bundle/toit directory, so -that this file appears as $HOME/.vim/bundle/toit/README.md +Vim 8 or later +============== -Alternatively, if you are using Vim 8 or newer you can recursively -copy this directory to a $HOME/.vim/pack/toit/start/toit directory -so that this file appears as $HOME/.vim/pack/toit/start/toit/README.md +If you are using Vim 8, or later, you can use the builtin +package support. Check out this package somewhere with git, +then link it into your .vim directory: -Syntax highlighting -=================== +```shell +cd somewhere-suitable +git clone https://github.com/toitware/ide-tools.git +mkdir -p $HOME/.vim/pack/foo/start +ln -s `pwd`/ide-tools/vim $HOME/.vim/pack/foo/start/toit +``` + +Vim 7 or earlier +================ + +If you are using an older vim, you can use Pathogen to manage your vim plugins. +In that case, it's enough to recursively copy this directory to a +$HOME/.vim/bundle/toit directory, so that this file appears as +$HOME/.vim/bundle/toit/README.md -Create a folder called `syntax` in the location of your vim/neovim installation, -copy `syntax/toit.vim` to that folder and add the following to your `.vimrc` or `init.vim` file: +If you are not using Pathogen, you can create a folder called `syntax` in the +location of your vim/neovim installation, copy `syntax/toit.vim` to that folder +and add the following to your `.vimrc` or `init.vim` file: ``` au! BufNewFile,BufReadPost *.{toit} set filetype=toit