mirror of
https://github.com/raimon49/requirements.txt.vim.git
synced 2026-01-31 04:15:21 +08:00
70 lines
1.8 KiB
Markdown
70 lines
1.8 KiB
Markdown
requirements.txt.vim
|
|
====================
|
|
|
|
[](https://travis-ci.org/raimon49/requirements.txt.vim)
|
|
[](https://gemnasium.com/raimon49/requirements.txt.vim)
|
|
|
|
[the Requirements File Format](http://pip.readthedocs.org/en/stable/reference/pip_install/#requirements-file-format) syntax support for Vim.
|
|
|
|

|
|
|
|
Installation
|
|
------------
|
|
|
|
### Plugin manager (**recommended**)
|
|
|
|
e.g.) [NeoBundle](https://github.com/Shougo/neobundle.vim), [Vundle](https://github.com/VundleVim/Vundle.vim), [vim-plug](https://github.com/junegunn/vim-plug) [and more](https://dotfiles.github.io/)
|
|
|
|
```vim
|
|
" NeoBundle
|
|
NeoBundle 'raimon49/requirements.txt.vim'
|
|
|
|
" Vundle
|
|
Plugin 'raimon49/requirements.txt.vim'
|
|
|
|
" vim-plug
|
|
Plug 'raimon49/requirements.txt.vim'
|
|
```
|
|
|
|
### Pathogen (https://github.com/tpope/vim-pathogen)
|
|
|
|
```sh
|
|
$ 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`
|
|
* `dev-requirements.txt`
|
|
* `requirements/dev.txt`
|
|
* `requires/tests.txt`
|
|
* `requirements.in`
|
|
* Use for [pip-tools](https://github.com/nvie/pip-tools) (a.k.a. Better dependency management tool).
|
|
|
|
### Customize
|
|
|
|
If you want to customize it.
|
|
|
|
```vim
|
|
" Add 'freeze' to your .vimrc as a detection pattern
|
|
let g:requirements#detect_filename_pattern = 'freeze'
|
|
```
|
|
|
|
```sh
|
|
$ pip freeze > my-freeze.txt
|
|
# You can edit it as a 'Requirements File Format'
|
|
$ vim my-freeze.txt
|
|
```
|
|
|
|
License
|
|
-------
|
|
|
|
[MIT License](LICENSE.txt)
|