Skip to content

Commit

Permalink
Update vim advice (#211)
Browse files Browse the repository at this point in the history
* Update vim advice for Vim 8 or later

* fix
  • Loading branch information
Erik Corry authored Mar 13, 2023
1 parent 58dd36a commit dbda69a
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions vim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dbda69a

Please sign in to comment.