vim-syntax-codeowners


Ⅰ. 插件描述

Vim syntax support for CODEOWNERS file supported by GitHub

Ⅱ. 基本信息

创建日期:  2019-01-08
使用用户:  1
Github星:  3
插件作者:  Linda_pp

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Vim filetype support for GitHub CODEOWNERS file

CODEOWNERS file is officially supported by GitHub.

CODEOWNERS file syntax is basically the same as .gitignore. vim-syntax-codeowners provides
additional syntax highlights and features for GitHub specific things:

  • Dedicated filetype codeowners
  • File path patterns highlighting
  • @user or @org/team highlighting

Comparison:

Default (ft=conf)By this plugin (ft=codeowners)
screenshot for confscreenshot-codeowners

Installation

If you use any package manager, please follow its instruction.

With vim-plug:

Plug 'rhysd/vim-syntax-codeowners'

With dein.vim:

call dein#add('rhysd/vim-syntax-codeowners')

With minpac:

call minpac#add('rhysd/vim-syntax-codeowners')

When you're using Vim's builtin packager, please follow instruction at :help pack-add.

Customization

g:codeowners_only_dot_github

If this variable exists and its value is set to 1, only setting codeowners filetype for .github/CODEOWNERS file.
This configuration is conservative and useful when you may use CODEOWNERS file outside GitHub since
.github directory is dedicated for GitHub.
By default this plugin sets codeowners filetype at any CODEOWNERS files.

Development

Repository is hosted at GitHub. Please report any issues or send patch by creating pull requests there.

License

Distributed under the MIT License

添加新评论