requirements.txt.vim


Ⅰ. 插件描述

the Requirements File Format syntax support for Vim

Ⅱ. 基本信息

创建日期:  2015-11-24
使用用户:  336
Github星:  36
插件作者:  raimon

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/raimon49/requirements.txt.vim

Ⅳ. 文档说明

requirements.txt.vim

Build Status
GitHub Release
MIT License
GitHub contributors
Known Vulnerabilities

the Requirements File Format syntax support for Vim.

requirements txt-sc

Table of Contents

Installation

Plugin manager (recommended)

e.g.) vim-plug, dein.vim, NeoBundle, Vundle and more

" vim-plug
Plug 'raimon49/requirements.txt.vim'

" vim-plug with on-demand
Plug 'raimon49/requirements.txt.vim', {'for': 'requirements'}

" dein.vim
call dein#add('raimon49/requirements.txt.vim')

" dein.vim with lazy
call dein#add('raimon49/requirements.txt.vim', {'lazy': 1, 'on_ft': 'requirements'})

" NeoBundle
NeoBundle 'raimon49/requirements.txt.vim'

" Vundle
Plugin 'raimon49/requirements.txt.vim'

Pathogen (https://github.com/tpope/vim-pathogen)

$ git clone https://github.com/raimon49/requirements.txt.vim.git ~/.vim/bundle/requirements.txt.vim

Manually

Deploy all files under $VIMRUNTIME.

File detection

requirements.txt.vim detects filename automatically.

  • requirements.txt
  • constraints.txt
  • dev-requirements.txt
  • requirements/dev.txt
  • requires/tests.txt
  • requirements.in

    • Use for pip-tools (a.k.a. Better dependency management tool).
  • *.pip

Customize

If you want to customize it.

" Add 'freeze' to your .vimrc as a detection pattern
let g:requirements#detect_filename_pattern = 'freeze'
$ pip freeze > my-freeze.txt
# You can edit it as a 'Requirements File Format'
$ vim my-freeze.txt

License

MIT License

添加新评论