From 05e4cc018a99d0f91eeab6ca525236f7efebf39d Mon Sep 17 00:00:00 2001 From: Matheus Marabesi <2129872+marabesi@users.noreply.github.com> Date: Sun, 13 May 2018 17:19:27 -0300 Subject: [PATCH 1/3] Update README.markdown added syntax highlight to make easier to read the options --- README.markdown | 62 +++++++++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/README.markdown b/README.markdown index 534bcc1..33aa7c6 100644 --- a/README.markdown +++ b/README.markdown @@ -22,63 +22,79 @@ To install the plugin copy `autoload`, `plugin`, `doc` directories into your `.v ### Pathogen 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: - cd ~/.vim/bundle - git clone git://github.com/nathanaelkane/vim-indent-guides.git +``` +cd ~/.vim/bundle +git clone git://github.com/nathanaelkane/vim-indent-guides.git +``` ### Vundle 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): - Plugin 'nathanaelkane/vim-indent-guides' +```vim +Plugin 'nathanaelkane/vim-indent-guides' +``` and then run the following command from inside Vim: - :PluginInstall - +```vim +:PluginInstall +``` ## Usage The default mapping to toggle the plugin is `ig`. You can also use the following commands inside Vim: - :IndentGuidesEnable - :IndentGuidesDisable - :IndentGuidesToggle +```vim +:IndentGuidesEnable +:IndentGuidesDisable +:IndentGuidesToggle +``` If you would like to have indent guides enabled by default, you can add the following to your `~/.vimrc`: - let g:indent_guides_enable_on_vim_startup = 1 - +```vim +let g:indent_guides_enable_on_vim_startup = 1 +``` ### gVim **This plugin should work with gVim out of the box, no configuration needed.** It will automatically inspect your colorscheme and pick appropriate colors. ### Setting custom indent colors 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: - let g:indent_guides_auto_colors = 0 - autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=red ctermbg=3 - autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=4 - +```vim +let g:indent_guides_auto_colors = 0 +autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=red ctermbg=3 +autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=4 +``` Alternatively you can add the following lines to your colorscheme file. - hi IndentGuidesOdd guibg=red ctermbg=3 - hi IndentGuidesEven guibg=green ctermbg=4 - +```vim +hi IndentGuidesOdd guibg=red ctermbg=3 +hi IndentGuidesEven guibg=green ctermbg=4 +``` ### Terminal Vim 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`. When `set background=dark` is used, the following highlight colors will be defined: - hi IndentGuidesOdd ctermbg=black - hi IndentGuidesEven ctermbg=darkgrey +```vim +hi IndentGuidesOdd ctermbg=black +hi IndentGuidesEven ctermbg=darkgrey +``` Alternatively, when `set background=light` is used, the following highlight colors will be defined: - hi IndentGuidesOdd ctermbg=white - hi IndentGuidesEven ctermbg=lightgrey +```vim +hi IndentGuidesOdd ctermbg=white +hi IndentGuidesEven ctermbg=lightgrey +``` 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: - colorscheme desert256 - set background=dark +```vim +colorscheme desert256 +set background=dark +``` Alternatively you can manually setup the highlight colors yourself, see `:help indent_guides_auto_colors` for an example. From d3cf41db52f455883643dd4fdee51b0f1e0cac6e Mon Sep 17 00:00:00 2001 From: Nate Kane Date: Mon, 14 May 2018 21:25:22 +1000 Subject: [PATCH 2/3] Add empty lines after fenced code blocks --- README.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.markdown b/README.markdown index 33aa7c6..7bfe6c0 100644 --- a/README.markdown +++ b/README.markdown @@ -39,6 +39,7 @@ and then run the following command from inside Vim: ```vim :PluginInstall ``` + ## Usage The default mapping to toggle the plugin is `ig`. @@ -55,6 +56,7 @@ If you would like to have indent guides enabled by default, you can add the foll ```vim let g:indent_guides_enable_on_vim_startup = 1 ``` + ### gVim **This plugin should work with gVim out of the box, no configuration needed.** It will automatically inspect your colorscheme and pick appropriate colors. @@ -66,12 +68,14 @@ let g:indent_guides_auto_colors = 0 autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=red ctermbg=3 autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=4 ``` + Alternatively you can add the following lines to your colorscheme file. ```vim hi IndentGuidesOdd guibg=red ctermbg=3 hi IndentGuidesEven guibg=green ctermbg=4 ``` + ### Terminal Vim 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`. From c59f68f7473f3c564aba9b91dca0385b5db38b74 Mon Sep 17 00:00:00 2001 From: Nate Kane Date: Mon, 14 May 2018 21:27:26 +1000 Subject: [PATCH 3/3] Use bash syntax highlighting for terminal commands in the readme --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 7bfe6c0..366d41c 100644 --- a/README.markdown +++ b/README.markdown @@ -22,7 +22,7 @@ To install the plugin copy `autoload`, `plugin`, `doc` directories into your `.v ### Pathogen 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: -``` +```bash cd ~/.vim/bundle git clone git://github.com/nathanaelkane/vim-indent-guides.git ```