vim-cobol-syntax-checker


Ⅰ. 插件描述

Check cobol syntax in vim

Ⅱ. 基本信息

创建日期:  2016-06-06
使用用户:  1
Github星:  6
插件作者:  Emmanuel Grognet

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'emmanuelgrognet/vim-cobol-syntax-checker'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'emmanuelgrognet/vim-cobol-syntax-checker'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'emmanuelgrognet/vim-cobol-syntax-checker'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/emmanuelgrognet/vim-cobol-syntax-checker

Ⅳ. 文档说明

# vim-cobol-syntax-checker

Introduction

Vim-cobol-syntax-checker is a vim plugin for check cobol syntax.

The plugin can check syntax on demand or automatically when file is save/open.

Free and strict cobol syntax are supported.

Check is done by the compiler cobc (aka GnuCOBOL https://sourceforge.net/projects/open-cobol/).

Screenshot

vim-cobol-syntax-checker in action

How it work ?

  • you write your code in cobol
  • when you save your code, the plugin run cobc and get the result
  • if there compile error, errors are displayed in the location list and signs are placed beside lines with errors
  • the focus is given on the first line that contains an error

Installation

Requirement

Installation with pathogen

cd ~/.vim/bundle

git clone https://github.com/emmanuelgrognet/vim-cobol-syntax-checker.git

Configuration

Strict/Free Cobol syntax

Free modern cobol syntax :

let g:cobol_syntax_checker_cobc_compiler_option = '-free'

Traditional old cobol syntax (default)

let g:cobol_syntax_checker_cobc_compiler_option = ''

Check syntax when open cobol file (default)

let g:cobol_syntax_checker_check_on_read = 1

Check syntax when save cobol file (default)

let g:cobol_syntax_checker_check_on_write = 1 

Auto open/close location list (default)

let g:cobol_syntax_checker_loc_auto_open_close = 1

添加新评论