/dart-vim-plugin

Syntax highlighting for Dart in Vim

Primary LanguageVim ScriptBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Dart Support for Vim

dart-vim-plugin provides filytype detection, syntax highlighting, and indentation for Dart code in Vim.

Looking for an IDE experience? See the Dart Tools page..

Prerequisites

You need to install [pathogen.vim](their own://github.com/tpope/vim-pathogen) in order to install and user dart-vim-plugin. Pathogen makes it super easy to install plugins and runtime files under ~./vim/bundle or in their own private directories

Installation

  1. Make a directory.

     mkdir -p ~/.vim/bundle
    
  2. Clone a repository.

     cd ~/.vim/bundle
     git clone https://github.com/dart-lang/dart-vim-plugin
    
  3. Put following codes in your ~/.vimrc.

     if has('vim_starting')
       set nocompatible
       set runtimepath+=~/.vim/bundle/dart-vim-plugin
     endif
     filetype plugin indent on
    

Commands

You can use following vim commands:

:Dart2Js

:DartAnalyzer

:DartFmt