Add section of 'File detection'

This commit is contained in:
raimon
2015-11-29 10:56:11 +09:00
parent 473ec56615
commit 5441c418e8

View File

@@ -4,7 +4,7 @@ requirements.txt.vim
[![Build Status](https://travis-ci.org/raimon49/requirements.txt.vim.svg?branch=master)](https://travis-ci.org/raimon49/requirements.txt.vim)
[![Dependency Status](https://gemnasium.com/raimon49/requirements.txt.vim.svg)](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
[the Requirements File Format](http://pip.readthedocs.org/en/stable/reference/pip_install/#requirements-file-format) syntax support for Vim.
![requirements txt-sc](https://cloud.githubusercontent.com/assets/221802/11379923/5cbb4862-9336-11e5-8963-217b2d7df397.png)
@@ -36,6 +36,31 @@ $ git clone https://github.com/raimon49/requirements.txt.vim.git ~/.vim/bundle/r
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).
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
-------