You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.markdown
+39-23Lines changed: 39 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,63 +22,79 @@ To install the plugin copy `autoload`, `plugin`, `doc` directories into your `.v
22
22
### Pathogen
23
23
If you have [Pathogen](http://www.vim.org/scripts/script.php?script_id=2332) installed, clone this repo into a subdirectory of your `.vim/bundle` directory like so:
If you have [Vundle](https://github.com/VundleVim/Vundle.vim) installed, add the following line to your `~/.vimrc` in the appropriate spot (see the Vundle.vim README for help):
30
32
31
-
Plugin 'nathanaelkane/vim-indent-guides'
33
+
```vim
34
+
Plugin 'nathanaelkane/vim-indent-guides'
35
+
```
32
36
33
37
and then run the following command from inside Vim:
34
38
35
-
:PluginInstall
36
-
39
+
```vim
40
+
:PluginInstall
41
+
```
37
42
## Usage
38
43
The default mapping to toggle the plugin is `<Leader>ig`.
39
44
40
45
You can also use the following commands inside Vim:
41
46
42
-
:IndentGuidesEnable
43
-
:IndentGuidesDisable
44
-
:IndentGuidesToggle
47
+
```vim
48
+
:IndentGuidesEnable
49
+
:IndentGuidesDisable
50
+
:IndentGuidesToggle
51
+
```
45
52
46
53
If you would like to have indent guides enabled by default, you can add the following to your `~/.vimrc`:
47
54
48
-
let g:indent_guides_enable_on_vim_startup = 1
49
-
55
+
```vim
56
+
let g:indent_guides_enable_on_vim_startup = 1
57
+
```
50
58
### gVim
51
59
**This plugin should work with gVim out of the box, no configuration needed.** It will automatically inspect your colorscheme and pick appropriate colors.
52
60
53
61
### Setting custom indent colors
54
62
Here's an example of how to define custom colors instead of using the ones the plugin automatically generates for you. Add this to your `.vimrc` file:
Alternatively you can add the following lines to your colorscheme file.
61
70
62
-
hi IndentGuidesOdd guibg=red ctermbg=3
63
-
hi IndentGuidesEven guibg=green ctermbg=4
64
-
71
+
```vim
72
+
hi IndentGuidesOdd guibg=red ctermbg=3
73
+
hi IndentGuidesEven guibg=green ctermbg=4
74
+
```
65
75
### Terminal Vim
66
76
At the moment Terminal Vim only has basic support. This means is that colors won't be automatically calculated based on your colorscheme. Instead, some preset colors are used depending on whether `background` is set to `dark` or `light`.
67
77
68
78
When `set background=dark` is used, the following highlight colors will be defined:
69
79
70
-
hi IndentGuidesOdd ctermbg=black
71
-
hi IndentGuidesEven ctermbg=darkgrey
80
+
```vim
81
+
hi IndentGuidesOdd ctermbg=black
82
+
hi IndentGuidesEven ctermbg=darkgrey
83
+
```
72
84
73
85
Alternatively, when `set background=light` is used, the following highlight colors will be defined:
74
86
75
-
hi IndentGuidesOdd ctermbg=white
76
-
hi IndentGuidesEven ctermbg=lightgrey
87
+
```vim
88
+
hi IndentGuidesOdd ctermbg=white
89
+
hi IndentGuidesEven ctermbg=lightgrey
90
+
```
77
91
78
92
If for some reason it's incorrectly defining light highlight colors instead of dark ones or vice versa, the first thing you should check is that the `background` value is being set correctly for your colorscheme. Sometimes it's best to manually set the `background` value in your `.vimrc`, for example:
79
93
80
-
colorscheme desert256
81
-
set background=dark
94
+
```vim
95
+
colorscheme desert256
96
+
set background=dark
97
+
```
82
98
83
99
Alternatively you can manually setup the highlight colors yourself, see `:help indent_guides_auto_colors` for an example.
0 commit comments