Created requirements (markdown)

Jeremy Pallats/starcraft.man 2016-02-21 14:16:19 -05:00
parent 1ea3ce85b6
commit b63854ad51

172
requirements.md Normal file

@ -0,0 +1,172 @@
## Requirements
#### Vim
vim-plug is known to work with Vim 7.0 or above, however 7.3+ is recommended.
#### Git
Most of the features should work with Git 1.7 or above.
However, installing plugins with tags is [known to fail](https://github.com/junegunn/vim-plug/issues/174) if Git is older than 1.7.10.
Git 1.8 or greater is recommended.
#### Neovim
Simply install [neovim](https://github.com/neovim/neovim/wiki/Installing-Neovim) to make use of the job based installer.
The one caveat is that it is [not synchronous](https://github.com/junegunn/vim-plug/issues/104) like the python or ruby installers.
This affects you when scripting, for instance `nvim +PlugUpdate +qa`.
In such cases vim-plug will use the python installer - which is synchronous - when available.
To use the python installer, install the pypi neovim library, optionally to root with sudo.
```viml
pip install neovim
```
You can check the neovim module is working inside nvim by doing:
```viml
:python print 'python works'
```
#### Ruby
The ruby installer requires the ruby interpreter (1.8.7+) and vim compiled with `+ruby` support.
You can check it works inside vim by:
```viml
:ruby puts 'ruby works'
```
#### Python 2 or 3
The python installer requires python version >= 2.6 or any version of 3.
Python 2.7 is recommended as many plugins still require `+python`.
Vim must be compiled with `+python` or `+python3`.
To check the interfaces work:
- `+python`: `:python print 'python 2 works'`
- `+python3`: `:python print('python 3 works')`
## Platform Installation
### Windows
On Windows the python installer works for GVim and terminal vim.
Ruby is only available when using vim from terminal.
The configurations below have been tested and work.
#### GVim
Install GVim, python and git. Ensure all are the same architecture 32 or 64 bit.
1. Install GVim for Windows, any version with `+python` or `+python3` should do.
- Official [GVim](http://www.vim.org/download.php#pc)
- Community [build](https://tuxproject.de/projects/vim/), frequently updated to latest patch level.
- Any other version with `+python` should do.
1. Insall a matching python and put it on your PATH. I suggest [Python 2.7](https://www.python.org/downloads/).
1. Install git and put it on your PATH. I suggest [Git For Windows](https://git-for-windows.github.io/).
- If you use the portable version, remember to edit your PATH variable to make it available on the cmd prompt.
- If you use the installer, select "Use Git from Windows Command Prompt".
#### msys2
Install msys2 then install the required packages. This will only allow you to use terminal vim.
1. Install [msys2](https://msys2.github.io/)
1. Install the required packages from terminal.
1. Use ruby: `pacman -S vim git ruby`
1. Use python: `pacman -S vim git python`
Reminder: The ruby installer ONLY works from terminal.
### OS X
OS X ships with Vim with Ruby support, so the parallel installer should work out of the box.
Also, you can easily install the latest version of Vim using [Homebrew](http://brew.sh/).
#### Issues with RVM
If you use RVM and have issues, build Vim with system default Ruby.
```sh
rvm use system
brew reinstall vim
```
### Linux
#### Ubuntu, Debian & Derivatives
The default vim has support for both python and ruby installers.
Just ensure you have all the required packages.
**Ruby**:
```sh
sudo apt-get install vim git ruby
```
**Python**:
```sh
sudo apt-get install vim git python
```
#### Arch
The default vim should work, just install any missing packages.
**Ruby**:
```sh
sudo pacman -S vim git ruby
```
**Python**:
```sh
sudo pacman -S vim git python
```
#### Building Vim & Python
This step is a **last** resort, allowing you to build the requirements for vim-plug.
You should use this if:
- Your version of python is too old.
- Your version of vim doesn't have `+python` or `+python3`.
- You just want a more recent version of one that isn't available from your package manager.
It should work on any POSIX machine with the required build-tools.
Please change the dependencies line if your platform is not debian based.
By default it will install into `/usr/local`, change DIR to install elsewhere.
```bash
#!/usr/bin/env bash
# This is where python & vim will be installed to.
DIR=/usr/local
PYTHON_URL=https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
NEED_SUDO=
if [[ "$DIR" == "/usr/local"* ]]; then
NEED_SUDO=sudo
fi
# List of dependencies on Ubuntu, bare minimum excluding GTK/GNOME support
sudo apt-get install build-essential autoconf libncurses-dev curl git
# Build python 2.7, install to $DIR
curl $PYTHON_URL | tar -xz
cd Python*
./configure --prefix=$DIR
make
$NEED_SUDO make install
cd -
command rm -rf Python*
# Build vim with +python, install to $DIR
git clone --depth 1 https://github.com/vim/vim
cd vim
vi_cv_path_python=$DIR/bin/python ./configure --prefix=$DIR --with-features=huge --enable-pythoninterp
PATH=$DIR/bin:$PATH make
$NEED_SUDO make install
cd -
command rm -rf vim
```