Dart is an object-oriented, typed, class defined, garbage collected language used for developing mobile, desktop, web, and back-end applications. Dart uses a C-like syntax derived from C, Java, and JavaScript, with features adopted from Smalltalk, Python, Ruby, and others.
More information about the language and its development environment at the official Dart Programming Language website.
dart.vim syntax detects and highlights Dart statements, reserved words, type declarations, storage classes, conditionals, loops, interpolated values, and comments. There is no support for idioms from Flutter or any other Dart framework.
The installation procedure described here are only required if the syntax detection and highlighting from this project have not been merged into the Vim public distribution.
Simple requirements:
- Dart syntax file(s) for Vim 8.1 and later
$HOME/.vim
must exist for local installation
Recommended:
Have Git available for automatic installation / updates to the $HOME/.vim
using the dart4vim
command, included with this distribution.
End-user installation is only required until the Vim team approves merging this
Dart syntax project into the main syntax files. Dart syntax highlighting
project maintainers also require manual file handling. This process installs
the files in $HOME/.vim
and Dart syntax highlight will be available on any
Vim / MacVim / gVim that the user runs.
- Exit Vim, MacVim, gVim - all Vim instances associated with your user
- Execute from the console:
curl -s https://raw.githubusercontent.com/pr3d4t0r/dart-vim-syntax/master/dart4vim | sh -s install
- Open
vim example.dart
to validate
- Exit Vim, MacVim, gVim - all Vim instances associated with your user
- Download the
dart4vim
bash script - Run the
./dart4vim install
script - Open
vim example.dart
to validate
- Exit Vim, MacVim, gVim - all Vim instances associated with your user
- Clone the Dart syntax repository:
git clone https://github.com/pr3d4t0r/dart-vim-syntax.git dart-vim
- Remove any old Dart syntax files already installed in
$HOME/.vim
./dart4vim remove
- Select the Git branch from whence to install the syntax files
- Install from the project working directory:
./dart4vim quick
- Open
vim example.dart
to validate
- Exit Vim, MacVim, gVim - all Vim instances associated with your user
- Clone the Dart syntax repository:
git clone https://github.com/pr3d4t0r/dart-vim-syntax.git dart-vim
- Copy the syntax file to the local environment:
cp dart-vim/syntax/dart.vim ~/.vim/syntax
- Then the file detection file:
cp dart-vim/ftdetect/dart.vim ~/.vim/ftdetect
- And the documentation:
cp dart-vim/doc/dart.vim ~/.vim/doc
- Open
vim example.dart
to validate
Support: Eugene Ciurana, <dart.syntax AT cime.net>, https://ciurana.eu/pgp or https://keybase.io/pr3d4t0r
Updates will be available through this repository and submitted for review to the Vim team in accordance to https://github.com/vim/vim/blob/master/contributing.md
Vim is Charityware. dart.vim syntax is Charityware.
© Copyright 2019 by Eugene Ciurana / pr3d4t0r. Licensed under the
standard VIM LICENSE - Vim command :help uganda.txt
for details.