Skip to content

Commit 54d889a

Browse files
committed
Merge branch 'marabesi-master'
* marabesi-master: Use bash syntax highlighting for terminal commands in the readme Add empty lines after fenced code blocks Update README.markdown
2 parents b406871 + c59f68f commit 54d889a

File tree

1 file changed

+39
-19
lines changed

1 file changed

+39
-19
lines changed

README.markdown

+39-19
Original file line numberDiff line numberDiff line change
@@ -22,63 +22,83 @@ To install the plugin copy `autoload`, `plugin`, `doc` directories into your `.v
2222
### Pathogen
2323
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:
2424

25-
cd ~/.vim/bundle
26-
git clone git://github.com/nathanaelkane/vim-indent-guides.git
25+
```bash
26+
cd ~/.vim/bundle
27+
git clone git://github.com/nathanaelkane/vim-indent-guides.git
28+
```
2729

2830
### Vundle
2931
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):
3032

31-
Plugin 'nathanaelkane/vim-indent-guides'
33+
```vim
34+
Plugin 'nathanaelkane/vim-indent-guides'
35+
```
3236

3337
and then run the following command from inside Vim:
3438

35-
:PluginInstall
39+
```vim
40+
:PluginInstall
41+
```
3642

3743
## Usage
3844
The default mapping to toggle the plugin is `<Leader>ig`.
3945

4046
You can also use the following commands inside Vim:
4147

42-
:IndentGuidesEnable
43-
:IndentGuidesDisable
44-
:IndentGuidesToggle
48+
```vim
49+
:IndentGuidesEnable
50+
:IndentGuidesDisable
51+
:IndentGuidesToggle
52+
```
4553

4654
If you would like to have indent guides enabled by default, you can add the following to your `~/.vimrc`:
4755

48-
let g:indent_guides_enable_on_vim_startup = 1
56+
```vim
57+
let g:indent_guides_enable_on_vim_startup = 1
58+
```
4959

5060
### gVim
5161
**This plugin should work with gVim out of the box, no configuration needed.** It will automatically inspect your colorscheme and pick appropriate colors.
5262

5363
### Setting custom indent colors
5464
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:
5565

56-
let g:indent_guides_auto_colors = 0
57-
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=red ctermbg=3
58-
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=4
66+
```vim
67+
let g:indent_guides_auto_colors = 0
68+
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=red ctermbg=3
69+
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=4
70+
```
5971

6072
Alternatively you can add the following lines to your colorscheme file.
6173

62-
hi IndentGuidesOdd guibg=red ctermbg=3
63-
hi IndentGuidesEven guibg=green ctermbg=4
74+
```vim
75+
hi IndentGuidesOdd guibg=red ctermbg=3
76+
hi IndentGuidesEven guibg=green ctermbg=4
77+
```
6478

6579
### Terminal Vim
6680
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`.
6781

6882
When `set background=dark` is used, the following highlight colors will be defined:
6983

70-
hi IndentGuidesOdd ctermbg=black
71-
hi IndentGuidesEven ctermbg=darkgrey
84+
```vim
85+
hi IndentGuidesOdd ctermbg=black
86+
hi IndentGuidesEven ctermbg=darkgrey
87+
```
7288

7389
Alternatively, when `set background=light` is used, the following highlight colors will be defined:
7490

75-
hi IndentGuidesOdd ctermbg=white
76-
hi IndentGuidesEven ctermbg=lightgrey
91+
```vim
92+
hi IndentGuidesOdd ctermbg=white
93+
hi IndentGuidesEven ctermbg=lightgrey
94+
```
7795

7896
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:
7997

80-
colorscheme desert256
81-
set background=dark
98+
```vim
99+
colorscheme desert256
100+
set background=dark
101+
```
82102

83103
Alternatively you can manually setup the highlight colors yourself, see `:help indent_guides_auto_colors` for an example.
84104

0 commit comments

Comments
 (0)