vim-dlang-phobos-highlighter


Ⅰ. 插件描述

Highlight Phobos and a few extras for D in vim

Ⅱ. 基本信息

创建日期:  2017-04-12
使用用户:  2
Github星:  3
插件作者:  Sireesh Kodali

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'sirsireesh/vim-dlang-phobos-highlighter'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'sirsireesh/vim-dlang-phobos-highlighter'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'sirsireesh/vim-dlang-phobos-highlighter'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/sirsireesh/vim-dlang-phobos-highlighter

Ⅳ. 文档说明

vim.d - additional vim d syntax highlighting

This file contains additional syntax highlighting that used for D
development in Vim. Compared to the standard syntax highlighting for D it
adds highlighting of (user defined) functions and the containers and types in
the standard library (phobos).

Optional features

Highlighting of class scope is disabled by default. To enable set

let g:d_class_scope_highlight = 1

Installation instructions

Follow one of the sets of directions below and reload vim afterwards.

Vundle

Install using vundle by adding

Plugin 'Sirsireesh/vim-dlang-phobos-highlighter'

to .vimrc and run :PluginInstall.

Git submodule + Pathogen

If you have pathogen installed,
and you prefer to use git submodules, run

cd ~/.vim
git submodule add https://github.com/Sirsireesh/vim-dlang-phobos-highlighter.git bundle/syntax/

Manual installation

If you don't have either Vundle or Pathogen installed, copy the d.vim file
to .vim/after/syntax.

git clone https://github.com/Sirsireesh/vim-dlang-phobos-highlighter.git /tmp/vim-dlang-phobos-highlighter
mkdir -p ~/.vim/after/syntax/
mv /tmp/vim-dlang-phobos-highlighter/after/syntax/d.vim ~/.vim/after/syntax/d.vim
rm -rf /tmp/vim-dlang-phobos-highlighter

Issues

Vim tend to a have issues with flagging braces as errors, see for example
https://github.com/vim-jp/vim-cpp/issues/16. A workaround is to set

let c_no_curly_error=1

Background information

Based heavily on vim-cpp-enhanced-highlight by octol, mostly copied from there

Sireesh Kodali

Last update: 12 April 2017

添加新评论