dracula-vim/INSTALL.md

109 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

2019-12-19 13:47:51 +00:00
### [Vim](http://www.vim.org/)
#### Install
2023-08-30 14:00:58 +00:00
These are the default instructions using Vim 8's `|packages|` feature. See sections below, if you use other plugin managers.
1. Create theme folder (in case you don't have it yet):
2023-08-30 14:00:58 +00:00
- `\*nix`:
2023-08-30 14:00:58 +00:00
```bash
# vim 8.2+
mkdir -p ~/.vim/pack/themes/start
# vim 8.0
mkdir -p ~/.vim/pack/themes/opt
```
- Windows: create directory `$HOME\vimfiles\pack\themes\start` or
`$HOME\vimfiles\pack\themes\opt`, according to your version.
2020-05-02 20:14:28 +00:00
2. Navigate to the folder above:
2023-08-30 14:00:58 +00:00
- `\*nix`:
2023-08-30 14:00:58 +00:00
```bash
# vim 8.2+
cd ~/.vim/pack/themes/start
# vim 8.0
cd ~/.vim/pack/themes/opt
```
- Windows: navigate to the directory you created earlier
3. Clone the repository using the "dracula" name:
2023-08-30 14:00:58 +00:00
```bash
git clone https://github.com/dracula/vim.git dracula
```
2023-08-30 14:00:58 +00:00
(Or use your favorite GUI client, or download the ZIP)
2021-05-19 16:37:44 +00:00
4. Edit your `vimrc` file with the following content:
```
if v:version < 802
packadd! dracula
endif
syntax enable
colorscheme dracula
```
The location of the `vimrc` varies between platforms:
2023-08-30 14:00:58 +00:00
- `\*nix`: `~/.vim/vimrc` or `~/.vimrc`
- Windows: `$HOME\vimfiles\vimrc` or `$HOME\_vimrc`
#### Install using other plugin managers
2019-12-19 13:47:51 +00:00
- If you [use vim + pathogen + submodules](http://vimcasts.org/episodes/synchronizing-plugins-with-git-submodules-and-pathogen/):
2023-08-30 14:00:58 +00:00
Navigate to your vim directory (`\*nix`: `~/.vim`; Windows: `$HOME\vimfiles`)
2019-12-19 13:47:51 +00:00
2023-08-30 14:00:58 +00:00
```bash
git submodule add git@github.com:dracula/vim.git bundle/dracula
```
2019-12-19 13:47:51 +00:00
Place `colorscheme dracula` after `execute pathogen#infect()`.
- If you [use vim + vundle](https://github.com/VundleVim/Vundle):
2019-12-19 13:47:51 +00:00
```vim
Plugin 'dracula/vim', { 'name': 'dracula' }
:PluginInstall
```
2019-12-19 13:47:51 +00:00
Place `colorscheme dracula` after `call vundle#end()`.
- If you [use vim-plug](https://github.com/junegunn/vim-plug) (\`as\` will install
2023-08-30 14:00:58 +00:00
the plugin in a directory called 'dracula' instead of just 'vim'):
2019-12-19 13:47:51 +00:00
```vim
Plug 'dracula/vim', { 'as': 'dracula' }
:PlugInstall
```
2019-12-19 13:47:51 +00:00
Place `colorscheme dracula` after `call plug#end()`.
2019-12-19 13:47:51 +00:00
- If you [use spacevim](https://spacevim.org), put the
2023-08-30 14:00:58 +00:00
following in `~/.SpaceVim.d/init.toml`:
```toml
[options]
colorscheme = "dracula"
2020-12-23 14:39:31 +00:00
colorscheme_bg = "dark"
[[custom_plugins]]
repo = "dracula/vim"
name = "dracula"
merged = false
```
---
2019-12-19 13:47:51 +00:00
Note that dracula must be in your `'runtimepath'` to load properly: Version 2.0
introduced autoload functionality for part of the plugin, which doesn't work
without `'runtimepath'` properly set. Consult your plugin-managers documentation
to make sure you put dracula on the `'runtimepath'` before loading it. For
`|packages|`, versions 8.2 and later will autoload `start` packages
correctly even in your vimrc.