syntastic-extras


Ⅰ. 插件描述

Additional Syntastic syntax checkers and features (for Vim)

Ⅱ. 基本信息

创建日期:  2014-02-01
使用用户:  37
Github星:  29
插件作者:  Steven Myint

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'myint/syntastic-extras'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'myint/syntastic-extras'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'myint/syntastic-extras'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/myint/syntastic-extras

Ⅳ. 文档说明

================

syntastic-extras

.. image:: https://travis-ci.org/myint/syntastic-extras.svg?branch=master

:target: https://travis-ci.org/myint/syntastic-extras
:alt: Build status

Additional syntax checkers for the Vim plugin Syntastic_.

.. _Syntastic: https://github.com/scrooloose/syntastic

Checkers

  • C:

.. code-block:: vim

" Like Syntastic's normal checker, but only checks files if there is a
" `.syntastic_c_config` file existing in the directory or an ancestor
" directory. It ignores warnings in included files by using `-isystem`
" instead of `-I`. It also supports `compile_commands.json` files generated
" by CMake. `compile_commands.json` is used if the Syntastic configuration
" file is not found. `compile_commands.json` is found using an ancestor
" search for `build/compile_commands.json`.
let g:syntastic_c_checkers = ['check']
  • C++:

.. code-block:: vim

" See above, but replace '.syntastic_c_config' with
" `.syntastic_cpp_config`.
let g:syntastic_cpp_checkers = ['check']
  • cfg/dosini:

.. code-block:: vim

let g:syntastic_cfg_checkers = ['cfg']
let g:syntastic_dosini_checkers = ['dosini']
  • GNU Make:

.. code-block:: vim

let g:syntastic_make_checkers = ['gnumake']
  • JSON

.. code-block:: vim

let g:syntastic_javascript_checkers = ['json_tool']
let g:syntastic_json_checkers = ['json_tool']
  • Language check in gitcommit/svn (commit prompts):

.. code-block:: vim

let g:syntastic_gitcommit_checkers = ['language_check']
let g:syntastic_svn_checkers = ['language_check']
  • proselint in gitcommit (commit prompts):

.. code-block:: vim

let g:syntastic_gitcommit_checkers = ['proselint']
  • Python:

.. code-block:: vim

" Like Syntastic's pyflakes checker, but treats messages about unused
" variables/imports as warnings rather than errors.
let g:syntastic_python_checkers = ['pyflakes_with_warnings']
  • YAML:

.. code-block:: vim

let g:syntastic_yaml_checkers = ['pyyaml']

Hooks

  • Block ZZ if there are syntax errors:

.. code-block:: vim

nnoremap ZZ :call syntastic_extras#quit_hook()<cr>

添加新评论