mirror of
https://github.com/preservim/vim-indent-guides.git
synced 2025-11-15 13:13:48 -05:00
Compare commits
102 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1e1390c01 | ||
|
|
9a106c73f6 | ||
|
|
d96c8182d1 | ||
|
|
3a4f7a6b99 | ||
|
|
c9d2473d5d | ||
|
|
5111d5b10c | ||
|
|
36b2d8d33c | ||
|
|
549dcf0d1f | ||
|
|
7ce9d4ee7f | ||
|
|
63554a38bb | ||
|
|
8e6d5f7afd | ||
|
|
425bdc51fd | ||
|
|
b507cbd39b | ||
|
|
30323b167d | ||
|
|
d382307613 | ||
|
|
765084d38b | ||
|
|
42f6d45e61 | ||
|
|
54d889a637 | ||
|
|
c59f68f747 | ||
|
|
d3cf41db52 | ||
|
|
05e4cc018a | ||
|
|
b40687195c | ||
|
|
b9657e0b8e | ||
|
|
018298ead9 | ||
|
|
930eba1560 | ||
|
|
6637da8436 | ||
|
|
67f3020a31 | ||
|
|
705c5fdf0d | ||
|
|
5d9c055689 | ||
|
|
470ef5e55f | ||
|
|
49bde6fa30 | ||
|
|
a0b7df69de | ||
|
|
1b108fc9c9 | ||
|
|
fef32d7481 | ||
|
|
9e2e492055 | ||
|
|
4895e86025 | ||
|
|
aedd70ff35 | ||
|
|
184e55848d | ||
|
|
7ab92f7c3f | ||
|
|
a397b3b549 | ||
|
|
f4213240a3 | ||
|
|
4228b349f1 | ||
|
|
7aac8169ea | ||
|
|
eec1b629dc | ||
|
|
3787ceb198 | ||
|
|
e5634c01fc | ||
|
|
3cfeff1930 | ||
|
|
48a4a8fda4 | ||
|
|
1c60df40e0 | ||
|
|
869bfc948e | ||
|
|
562cc0de84 | ||
|
|
0996492531 | ||
|
|
c8f2f3c089 | ||
|
|
a5700082c7 | ||
|
|
d29fbb3fa3 | ||
|
|
29037575e3 | ||
|
|
cf3948a3fb | ||
|
|
3b134f394d | ||
|
|
997bede1b5 | ||
|
|
0421be28b3 | ||
|
|
ac069a993e | ||
|
|
74c8bdeecb | ||
|
|
5bc809d055 | ||
|
|
d9fe8b1fcf | ||
|
|
66306748d8 | ||
|
|
1cd149ed2e | ||
|
|
c909e3193a | ||
|
|
cf6f4d4661 | ||
|
|
2cbe919452 | ||
|
|
e8f50f3c8b | ||
|
|
f1c115ce5d | ||
|
|
287132df04 | ||
|
|
bdf4ec3ff8 | ||
|
|
57b6da6d12 | ||
|
|
6854275667 | ||
|
|
eb5644430a | ||
|
|
951619130f | ||
|
|
9d189306aa | ||
|
|
62a2fd103f | ||
|
|
7826042406 | ||
|
|
6e145a10cf | ||
|
|
60f435ee57 | ||
|
|
5f48d29177 | ||
|
|
a3ba000ddb | ||
|
|
d9c596352a | ||
|
|
7af506c797 | ||
|
|
73703c93ad | ||
|
|
78d34d1018 | ||
|
|
f7d5111c34 | ||
|
|
0a14a1558e | ||
|
|
ed8eff420b | ||
|
|
5146db837f | ||
|
|
feba7e9fa7 | ||
|
|
2415d8b709 | ||
|
|
fa67d46aca | ||
|
|
f972f0264f | ||
|
|
3cd1b09fb3 | ||
|
|
9441c97e57 | ||
|
|
10b809d187 | ||
|
|
4a3c2d3d46 | ||
|
|
353bef3dba | ||
|
|
3c86647883 |
15
.github/workflows/vint.yml
vendored
Normal file
15
.github/workflows/vint.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: Vint
|
||||
on: [push]
|
||||
jobs:
|
||||
vint:
|
||||
name: vint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
- name: Setup dependencies
|
||||
run: pip install vim-vint
|
||||
- name: Lint Vimscript
|
||||
run: vint .
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
doc/tags
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Nathanael Kane
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,28 +1,64 @@
|
||||
# Indent Guides
|
||||
|
||||
[](https://github.com/preservim/vim-indent-guides/actions?workflow=Vint)
|
||||
|
||||
Indent Guides is a plugin for visually displaying indent levels in Vim.
|
||||
|
||||
<img src="http://i.imgur.com/ONgoj.png" width="448" height="448" alt="" />
|
||||
|
||||
## Features:
|
||||
* Can detect both tab and space indent styles.
|
||||
* Automatically inspects your colorscheme and picks appropriate colors (gVim only).
|
||||
* Will highlight indent levels with alternating colors.
|
||||
* Full support for gVim and basic support for Terminal Vim.
|
||||
* Seems to work on Windows gVim 7.3 (haven't done any extensive tests though).
|
||||
* **NEW:** Customizable size for indent guides, eg. skinny guides (soft-tabs only).
|
||||
* **NEW:** Customizable start indent level.
|
||||
* Customizable size for indent guides, eg. skinny guides (soft-tabs only).
|
||||
* Customizable start indent level.
|
||||
* Highlight support for files with a mixture of tab and space indent styles.
|
||||
|
||||
## Requirements
|
||||
* Vim 7.2+
|
||||
|
||||
## Installation
|
||||
To install the plugin just copy `autoload`, `plugin`, `doc` directories into your `.vim` directory.
|
||||
To install the plugin copy `autoload`, `plugin`, `doc` directories into your `.vim` directory.
|
||||
|
||||
Alternatively if you have [Pathogen](http://www.vim.org/scripts/script.php?script_id=2332) installed, just clone this repo into a subdirectory of your `.vim/bundle` directory like so:
|
||||
### 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
|
||||
```bash
|
||||
cd ~/.vim/bundle
|
||||
git clone git://github.com/preservim/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):
|
||||
|
||||
```vim
|
||||
Plugin 'nathanaelkane/vim-indent-guides'
|
||||
```
|
||||
|
||||
and then run the following command from inside Vim:
|
||||
|
||||
```vim
|
||||
:PluginInstall
|
||||
```
|
||||
|
||||
## Usage
|
||||
The default mapping to toggle the plugin is `<Leader>ig`
|
||||
The default mapping to toggle the plugin is `<Leader>ig`.
|
||||
|
||||
You can also use the following commands inside Vim:
|
||||
|
||||
```vim
|
||||
:IndentGuidesEnable
|
||||
:IndentGuidesDisable
|
||||
:IndentGuidesToggle
|
||||
```
|
||||
|
||||
If you would like to have indent guides enabled by default, you can add the following to your `~/.vimrc`:
|
||||
|
||||
```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.
|
||||
@@ -30,27 +66,42 @@ The default mapping to toggle the plugin is `<Leader>ig`
|
||||
### 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.
|
||||
|
||||
```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 IndentGuidesEven ctermbg=darkgrey
|
||||
hi IndentGuidesOdd ctermbg=black
|
||||
```vim
|
||||
hi IndentGuidesOdd ctermbg=black
|
||||
hi IndentGuidesEven ctermbg=darkgrey
|
||||
```
|
||||
|
||||
Alternatively, when `set background=light` is used, the following highlight colors will be defined:
|
||||
|
||||
hi IndentGuidesEven ctermbg=lightgrey
|
||||
hi IndentGuidesOdd ctermbg=white
|
||||
```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.
|
||||
|
||||
@@ -58,8 +109,6 @@ Alternatively you can manually setup the highlight colors yourself, see `:help i
|
||||
`:help indent-guides`
|
||||
|
||||
## Screenshots
|
||||
<img src="http://i.imgur.com/ONgoj.png" width="448" height="448" alt="" />
|
||||
<img src="http://i.imgur.com/7tMBl.png" width="448" height="448" alt="" />
|
||||
<img src="http://i.imgur.com/EvrqK.png" width="448" height="448" alt="" />
|
||||
<img src="http://i.imgur.com/hHqp2.png" width="448" height="448" alt="" />
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" Author: Nate Kane <nathanaelkane AT gmail DOT com>
|
||||
" Homepage: http://github.com/nathanaelkane/vim-indent-guides
|
||||
" Homepage: http://github.com/preservim/vim-indent-guides
|
||||
|
||||
"
|
||||
" Return hex string equivalent to given decimal string or number.
|
||||
@@ -10,7 +10,7 @@
|
||||
" Example: color_helper#dec_to_hex(255, 5)
|
||||
" Returns: '000FF'
|
||||
"
|
||||
function! color_helper#dec_to_hex(arg, padding)
|
||||
function! color_helper#dec_to_hex(arg, padding) abort
|
||||
return toupper(printf('%0' . a:padding . 'x', a:arg + 0))
|
||||
endfunction
|
||||
|
||||
@@ -26,7 +26,7 @@ endfunction
|
||||
" Example: color_helper#hex_to_dec('00')
|
||||
" Returns: 0
|
||||
"
|
||||
function! color_helper#hex_to_dec(arg)
|
||||
function! color_helper#hex_to_dec(arg) abort
|
||||
return (a:arg =~? '^0x') ? a:arg + 0 : ('0x'.a:arg) + 0
|
||||
endfunction
|
||||
|
||||
@@ -36,7 +36,7 @@ endfunction
|
||||
" Example: color_helper#hex_color_to_rgb('#0088FF')
|
||||
" Returns: [0, 136, 255]
|
||||
"
|
||||
function! color_helper#hex_color_to_rgb(hex_color)
|
||||
function! color_helper#hex_color_to_rgb(hex_color) abort
|
||||
let l:rgb = []
|
||||
|
||||
if a:hex_color =~ g:indent_guides_color_hex_pattern
|
||||
@@ -55,7 +55,7 @@ endfunction
|
||||
" Example: color_helper#rgb_color_to_hex([0, 136, 255])
|
||||
" Returns: '#0088FF'
|
||||
"
|
||||
function! color_helper#rgb_color_to_hex(rgb_color)
|
||||
function! color_helper#rgb_color_to_hex(rgb_color) abort
|
||||
let l:hex_color = '#'
|
||||
let l:hex_color .= color_helper#dec_to_hex(a:rgb_color[0], 2) " red
|
||||
let l:hex_color .= color_helper#dec_to_hex(a:rgb_color[1], 2) " green
|
||||
@@ -71,7 +71,7 @@ endfunction
|
||||
" Example: color_helper#hex_color_lighten('#000000', 0.10)
|
||||
" Returns: '#191919'
|
||||
"
|
||||
function! color_helper#hex_color_lighten(color, percent)
|
||||
function! color_helper#hex_color_lighten(color, percent) abort
|
||||
let l:rgb = color_helper#hex_color_to_rgb(a:color)
|
||||
let l:rgb_lightened = []
|
||||
|
||||
@@ -89,7 +89,7 @@ endfunction
|
||||
" Example: color_helper#hex_color_darken('#FFFFFF', 0.10)
|
||||
" Returns: '#E5E5E5'
|
||||
"
|
||||
function! color_helper#hex_color_darken(color, percent)
|
||||
function! color_helper#hex_color_darken(color, percent) abort
|
||||
let l:rgb = color_helper#hex_color_to_rgb(a:color)
|
||||
let l:rgb_darkened = []
|
||||
|
||||
@@ -106,7 +106,7 @@ endfunction
|
||||
" Example: color_helper#color_name_to_hex('darkslategray')
|
||||
" Returns: '#2F4F4F'
|
||||
"
|
||||
function! color_helper#color_name_to_hex(color_name)
|
||||
function! color_helper#color_name_to_hex(color_name) abort
|
||||
let l:hex_code = ''
|
||||
let l:color_name = tolower(a:color_name)
|
||||
|
||||
@@ -877,4 +877,3 @@ function! color_helper#color_name_to_hex(color_name)
|
||||
|
||||
return l:hex_code
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
" Author: Nate Kane <nathanaelkane AT gmail DOT com>
|
||||
" Homepage: http://github.com/nathanaelkane/vim-indent-guides
|
||||
" Homepage: http://github.com/preservim/vim-indent-guides
|
||||
|
||||
"
|
||||
" Toggles the indent guides on and off.
|
||||
"
|
||||
function! indent_guides#toggle()
|
||||
function! indent_guides#toggle() abort
|
||||
call indent_guides#init_matches()
|
||||
|
||||
if empty(w:indent_guides_matches)
|
||||
@@ -18,7 +18,7 @@ endfunction
|
||||
" Called from autocmds, keeps indent guides enabled or disabled when entering
|
||||
" other buffers and windows.
|
||||
"
|
||||
function! indent_guides#process_autocmds()
|
||||
function! indent_guides#process_autocmds() abort
|
||||
if g:indent_guides_autocmds_enabled
|
||||
call indent_guides#enable()
|
||||
else
|
||||
@@ -30,9 +30,14 @@ endfunction
|
||||
" Enables the indent guides for the current buffer and any other buffer upon
|
||||
" entering it.
|
||||
"
|
||||
function! indent_guides#enable()
|
||||
function! indent_guides#enable() abort
|
||||
let g:indent_guides_autocmds_enabled = 1
|
||||
|
||||
if &diff || indent_guides#exclude_filetype()
|
||||
call indent_guides#clear_matches()
|
||||
return
|
||||
end
|
||||
|
||||
call indent_guides#init_script_vars()
|
||||
call indent_guides#highlight_colors()
|
||||
call indent_guides#clear_matches()
|
||||
@@ -40,13 +45,18 @@ function! indent_guides#enable()
|
||||
" loop through each indent level and define a highlight pattern
|
||||
" will automagically figure out whether to use tabs or spaces
|
||||
for l:level in range(s:start_level, s:indent_levels)
|
||||
let l:group = 'IndentGuides' . ((l:level % 2 == 0) ? 'Even' : 'Odd')
|
||||
let l:pattern = '^\s\{' . (l:level * s:indent_size - s:indent_size) . '\}\zs'
|
||||
let l:pattern .= '\s\{' . s:guide_size . '\}'
|
||||
let l:pattern .= '\ze'
|
||||
let l:group = 'IndentGuides' . ((l:level % 2 == 0) ? 'Even' : 'Odd')
|
||||
let l:column_start = (l:level - 1) * s:indent_size + 1
|
||||
|
||||
" define the higlight pattern and add to list
|
||||
call add(w:indent_guides_matches, matchadd(l:group, l:pattern))
|
||||
" define the higlight patterns and add to matches list
|
||||
if g:indent_guides_space_guides
|
||||
let l:soft_pattern = indent_guides#indent_highlight_pattern(g:indent_guides_soft_pattern, l:column_start, s:guide_size)
|
||||
call add(w:indent_guides_matches, matchadd(l:group, l:soft_pattern))
|
||||
end
|
||||
if g:indent_guides_tab_guides
|
||||
let l:hard_pattern = indent_guides#indent_highlight_pattern('\t', l:column_start, s:indent_size)
|
||||
call add(w:indent_guides_matches, matchadd(l:group, l:hard_pattern))
|
||||
end
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
@@ -54,7 +64,7 @@ endfunction
|
||||
" Disables the indent guides for the current buffer and any other buffer upon
|
||||
" entering it.
|
||||
"
|
||||
function! indent_guides#disable()
|
||||
function! indent_guides#disable() abort
|
||||
let g:indent_guides_autocmds_enabled = 0
|
||||
call indent_guides#clear_matches()
|
||||
endfunction
|
||||
@@ -62,24 +72,35 @@ endfunction
|
||||
"
|
||||
" Clear all highlight matches for the current window.
|
||||
"
|
||||
function! indent_guides#clear_matches()
|
||||
function! indent_guides#clear_matches() abort
|
||||
call indent_guides#init_matches()
|
||||
if !empty(w:indent_guides_matches)
|
||||
let l:index = 0
|
||||
for l:match_id in w:indent_guides_matches
|
||||
call matchdelete(l:match_id)
|
||||
try
|
||||
call matchdelete(l:match_id)
|
||||
catch /E803:/
|
||||
" Do nothing
|
||||
endtry
|
||||
call remove(w:indent_guides_matches, l:index)
|
||||
let l:index += l:index
|
||||
endfor
|
||||
endif
|
||||
|
||||
" Make sure to clear indent guide if remembered match id has gone somehow.
|
||||
for l:match in getmatches()
|
||||
if l:match.group =~# '^IndentGuides\v(Even|Odd)$'
|
||||
call matchdelete(l:match.id)
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
"
|
||||
" Automagically calculates and defines the indent highlight colors.
|
||||
"
|
||||
function! indent_guides#highlight_colors()
|
||||
function! indent_guides#highlight_colors() abort
|
||||
if s:auto_colors
|
||||
if has('gui_running')
|
||||
if has('gui_running') || has('nvim') || (has('termguicolors') && &termguicolors)
|
||||
call indent_guides#gui_highlight_colors()
|
||||
else
|
||||
call indent_guides#basic_highlight_colors()
|
||||
@@ -91,19 +112,19 @@ endfunction
|
||||
" Defines some basic indent highlight colors that work for Terminal Vim and
|
||||
" gVim when colors can't be automatically calculated.
|
||||
"
|
||||
function! indent_guides#basic_highlight_colors()
|
||||
let l:cterm_colors = (&g:background == 'dark') ? ['darkgrey', 'black'] : ['lightgrey', 'white']
|
||||
let l:gui_colors = (&g:background == 'dark') ? ['grey15', 'grey30'] : ['grey70', 'grey85']
|
||||
function! indent_guides#basic_highlight_colors() abort
|
||||
let l:cterm_colors = (&g:background ==# 'dark') ? ['darkgrey', 'black'] : ['lightgrey', 'white']
|
||||
let l:gui_colors = (&g:background ==# 'dark') ? ['grey15', 'grey30'] : ['grey70', 'grey85']
|
||||
|
||||
exe 'hi IndentGuidesEven guibg=' . l:gui_colors[0] . ' ctermbg=' . l:cterm_colors[0]
|
||||
exe 'hi IndentGuidesOdd guibg=' . l:gui_colors[1] . ' ctermbg=' . l:cterm_colors[1]
|
||||
exe 'hi IndentGuidesEven guibg=' . l:gui_colors[0] . ' guifg=' . l:gui_colors[1] . ' ctermbg=' . l:cterm_colors[0] . ' ctermfg=' . l:cterm_colors[1]
|
||||
exe 'hi IndentGuidesOdd guibg=' . l:gui_colors[1] . ' guifg=' . l:gui_colors[0] . ' ctermbg=' . l:cterm_colors[1] . ' ctermfg=' . l:cterm_colors[0]
|
||||
endfunction
|
||||
|
||||
"
|
||||
" Automagically calculates and defines the indent highlight colors for gui
|
||||
" vim.
|
||||
"
|
||||
function! indent_guides#gui_highlight_colors()
|
||||
function! indent_guides#gui_highlight_colors() abort
|
||||
let l:hi_normal_guibg = ''
|
||||
|
||||
" capture the backgroud color from the normal highlight
|
||||
@@ -127,8 +148,8 @@ function! indent_guides#gui_highlight_colors()
|
||||
let l:hi_even_bg = indent_guides#lighten_or_darken_color(l:hi_odd_bg)
|
||||
|
||||
" define the new highlights
|
||||
exe 'hi IndentGuidesOdd guibg=' . l:hi_odd_bg
|
||||
exe 'hi IndentGuidesEven guibg=' . l:hi_even_bg
|
||||
exe 'hi IndentGuidesOdd guibg=' . l:hi_odd_bg . ' guifg=' . l:hi_even_bg
|
||||
exe 'hi IndentGuidesEven guibg=' . l:hi_even_bg . ' guifg=' . l:hi_odd_bg
|
||||
end
|
||||
endfunction
|
||||
|
||||
@@ -136,10 +157,10 @@ endfunction
|
||||
" Takes a color and darkens or lightens it depending on whether a dark or light
|
||||
" colorscheme is being used.
|
||||
"
|
||||
function! indent_guides#lighten_or_darken_color(color)
|
||||
function! indent_guides#lighten_or_darken_color(color) abort
|
||||
let l:new_color = ''
|
||||
|
||||
if (&g:background == 'dark')
|
||||
if (&g:background ==# 'dark')
|
||||
let l:new_color = color_helper#hex_color_lighten(a:color, s:change_percent)
|
||||
else
|
||||
let l:new_color = color_helper#hex_color_darken (a:color, s:change_percent)
|
||||
@@ -151,15 +172,15 @@ endfunction
|
||||
"
|
||||
" Define default highlights.
|
||||
"
|
||||
function! indent_guides#define_default_highlights()
|
||||
exe 'hi IndentGuidesOdd guibg=NONE ctermbg=NONE'
|
||||
exe 'hi IndentGuidesEven guibg=NONE ctermbg=NONE'
|
||||
function! indent_guides#define_default_highlights() abort
|
||||
hi default clear IndentGuidesOdd
|
||||
hi default clear IndentGuidesEven
|
||||
endfunction
|
||||
|
||||
"
|
||||
" Init the w:indent_guides_matches variable.
|
||||
"
|
||||
function! indent_guides#init_matches()
|
||||
function! indent_guides#init_matches() abort
|
||||
let w:indent_guides_matches = exists('w:indent_guides_matches') ? w:indent_guides_matches : []
|
||||
endfunction
|
||||
|
||||
@@ -167,21 +188,34 @@ endfunction
|
||||
" We need to initialize these vars every time a buffer is entered while the
|
||||
" plugin is enabled.
|
||||
"
|
||||
function! indent_guides#init_script_vars()
|
||||
let s:indent_size = indent_guides#get_indent_size()
|
||||
function! indent_guides#init_script_vars() abort
|
||||
if &l:shiftwidth > 0 && &l:expandtab
|
||||
let s:indent_size = &l:shiftwidth
|
||||
else
|
||||
let s:indent_size = &l:tabstop
|
||||
endif
|
||||
let s:guide_size = indent_guides#calculate_guide_size()
|
||||
let s:hi_normal = indent_guides#capture_highlight('Normal')
|
||||
|
||||
" remove 'font=<value>' from the s:hi_normal string (only seems to happen on Vim startup in Windows)
|
||||
let s:hi_normal = substitute(s:hi_normal, ' font=[A-Za-z0-9:]\+', '', '')
|
||||
|
||||
" shortcuts to the global variables - this makes the code easier to read
|
||||
let s:debug = g:indent_guides_debug
|
||||
let s:indent_levels = g:indent_guides_indent_levels
|
||||
let s:auto_colors = g:indent_guides_auto_colors
|
||||
let s:change_percent = g:indent_guides_color_change_percent / 100.0
|
||||
let s:color_hex_pat = g:indent_guides_color_hex_pattern
|
||||
let s:color_hex_bg_pat = g:indent_guides_color_hex_guibg_pattern
|
||||
let s:color_name_bg_pat = g:indent_guides_color_name_guibg_pattern
|
||||
let s:start_level = g:indent_guides_start_level
|
||||
|
||||
" str2float not available in vim versions <= 7.1
|
||||
if has('float')
|
||||
let s:change_percent = g:indent_guides_color_change_percent / str2float('100.0')
|
||||
else
|
||||
let s:change_percent = g:indent_guides_color_change_percent / 100.0
|
||||
endif
|
||||
|
||||
if s:debug
|
||||
echo 's:indent_size = ' . s:indent_size
|
||||
echo 's:guide_size = ' . s:guide_size
|
||||
@@ -202,39 +236,60 @@ endfunction
|
||||
"
|
||||
" NOTE: Currently, this only works when soft-tabs are being used.
|
||||
"
|
||||
function! indent_guides#calculate_guide_size()
|
||||
let l:guide_size = g:indent_guides_guide_size
|
||||
let l:indent_size = indent_guides#get_indent_size()
|
||||
function! indent_guides#calculate_guide_size() abort
|
||||
let l:guide_size = g:indent_guides_guide_size
|
||||
|
||||
if l:indent_size > 1 && l:guide_size >= 1
|
||||
let l:guide_size = (l:guide_size > s:indent_size) ? s:indent_size : l:guide_size
|
||||
else
|
||||
if l:guide_size == 0 || l:guide_size > s:indent_size
|
||||
let l:guide_size = s:indent_size
|
||||
endif
|
||||
|
||||
return l:guide_size
|
||||
endfunction
|
||||
|
||||
"
|
||||
" Gets the indent size, which depends on whether soft-tabs or hard-tabs are
|
||||
" being used.
|
||||
"
|
||||
function! indent_guides#get_indent_size()
|
||||
return (&l:expandtab == 1) ? &l:shiftwidth : 1
|
||||
endfunction
|
||||
|
||||
"
|
||||
" Captures and returns the output of highlight group definitions.
|
||||
"
|
||||
" Example: indent_guides#capture_highlight('normal')
|
||||
" Returns: 'Normal xxx guifg=#323232 guibg=#ffffff
|
||||
" Returns: 'Normal xxx guifg=#323232 guibg=#ffffff'
|
||||
"
|
||||
function! indent_guides#capture_highlight(group_name)
|
||||
redir => l:output
|
||||
exe "silent hi " . a:group_name
|
||||
redir END
|
||||
|
||||
let l:output = substitute(l:output, "\n", "", "")
|
||||
function! indent_guides#capture_highlight(group_name) abort
|
||||
let l:output = execute('hi ' . a:group_name, 'silent')
|
||||
let l:output = substitute(l:output, '\n', '', '')
|
||||
return l:output
|
||||
endfunction
|
||||
|
||||
"
|
||||
" Returns a regex pattern for highlighting an indent level.
|
||||
"
|
||||
" Example: indent_guides#indent_highlight_pattern(' ', 1, 4)
|
||||
" Returns: /^ *\%1v\zs *\%5v\ze/
|
||||
"
|
||||
" Example: indent_guides#indent_highlight_pattern('\s', 5, 2)
|
||||
" Returns: /^\s*\%5v\zs\s*\%7v\ze/
|
||||
"
|
||||
" Example: indent_guides#indent_highlight_pattern('\t', 9, 2)
|
||||
" Returns: /^\t*\%9v\zs\t*\%11v\ze/
|
||||
"
|
||||
function! indent_guides#indent_highlight_pattern(indent_pattern, column_start, indent_size) abort
|
||||
let l:pattern = '^' . a:indent_pattern . '*\%' . a:column_start . 'v\zs'
|
||||
let l:pattern .= a:indent_pattern . '*\%' . (a:column_start + a:indent_size) . 'v'
|
||||
let l:pattern .= '\ze'
|
||||
return l:pattern
|
||||
endfunction
|
||||
|
||||
"
|
||||
" Detect if any of the buffer filetypes should be excluded.
|
||||
"
|
||||
function! indent_guides#exclude_filetype() abort
|
||||
if exists('g:indent_guides_exclude_buftype')
|
||||
if g:indent_guides_exclude_buftype && &buftype !=# ''
|
||||
return 1
|
||||
endif
|
||||
endif
|
||||
for ft in split(&ft, '\.', 1)
|
||||
if index(g:indent_guides_exclude_filetypes, ft) > -1
|
||||
return 1
|
||||
end
|
||||
endfor
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
|
||||
Author: Nate Kane <nathanaelkane AT gmail DOT com>
|
||||
Version: 1.3
|
||||
Last Change: 17 Jan 2011
|
||||
Version: 1.7
|
||||
Last Change: 07 Mar 2013
|
||||
|
||||
==============================================================================
|
||||
CONTENTS *indent-guides-contents*
|
||||
@@ -41,6 +41,7 @@ Features:~
|
||||
though).
|
||||
* Customizable size for indent guides, eg. skinny guides (soft-tabs only).
|
||||
* Customizable start indent level.
|
||||
* Highlight support for files with a mixture of tab and space indent styles.
|
||||
|
||||
==============================================================================
|
||||
2. COMMANDS *indent-guides-commands*
|
||||
@@ -90,6 +91,12 @@ in an autocmd.
|
||||
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
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'indent_guides_color_change_percent'*
|
||||
Use this option to control the percent at which the highlight colors will be
|
||||
@@ -126,20 +133,84 @@ Default: 1. Values: between 1 and g:|indent_guides_indent_levels|.
|
||||
let g:indent_guides_start_level = 2
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'indent_guides_space_guides'*
|
||||
Use this option to control whether the plugin considers spaces as indention.
|
||||
|
||||
Default: 1. Values: 0 or 1.
|
||||
>
|
||||
let g:indent_guides_space_guides = 0
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'indent_guides_tab_guides'*
|
||||
Use this option to control whether the plugin considers tabs as indention.
|
||||
|
||||
Default: 1. Values: 0 or 1.
|
||||
>
|
||||
let g:indent_guides_tab_guides = 0
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'indent_guides_soft_pattern'*
|
||||
Use this option to explicitly specify a pattern for soft indentation. For
|
||||
example to match spaces only in the beginning of line use ' ' pattern.
|
||||
|
||||
Default: '\s'. Values: Vim regexp.
|
||||
>
|
||||
let g:indent_guides_soft_pattern = ' '
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'indent_guides_enable_on_vim_startup'*
|
||||
Use this option to control whether the plugin is enabled on Vim startup.
|
||||
|
||||
Default: 0. Values: 0 or 1.
|
||||
>
|
||||
let g:indent_guides_enable_on_vim_startup = 0
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'indent_guides_exclude_buftype'*
|
||||
Use this option to try and disable the plugin on non-file buffers
|
||||
|
||||
Default: 0. Values: 0 or 1
|
||||
>
|
||||
let g:indent_guides_exclude_buftype = 0
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*'indent_guides_exclude_filetypes'*
|
||||
Use this option to specify a list of filetypes to disable the plugin for. Use
|
||||
'' for files with no filetypes set.
|
||||
|
||||
Default: ['help']. Values: list of strings.
|
||||
>
|
||||
let g:indent_guides_exclude_filetypes = ['help', 'nerdtree']
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'indent_guides_default_mapping'*
|
||||
Use this option to control whether the default mapping (<Leader>ig) gets set.
|
||||
|
||||
Default: 1. Values: 0 or 1.
|
||||
>
|
||||
let g:indent_guides_default_mapping = 0
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
4. MAPPINGS *indent-guides-mappings*
|
||||
|
||||
The default mapping for toggling indent guides is <Leader>ig. You can easily
|
||||
map it to other keys. For example:
|
||||
>
|
||||
:nmap <Leader>ig :IndentGuidesToggle<CR>
|
||||
:nmap <silent> <Leader>ig <Plug>IndentGuidesToggle
|
||||
<
|
||||
|
||||
You can also map some other commands that are not mapped by default. For
|
||||
example:
|
||||
>
|
||||
:nmap <Leader>ie :IndentGuidesEnable<CR>
|
||||
:nmap <Leader>id :IndentGuidesDisable<CR>
|
||||
:nmap <silent> <Leader>ie <Plug>IndentGuidesEnable
|
||||
:nmap <silent> <Leader>id <Plug>IndentGuidesDisable
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
@@ -153,15 +224,15 @@ preset colors are used depending on whether `background` is set to `dark` or
|
||||
When `set background=dark` is used, the following highlight colors will be
|
||||
defined:
|
||||
>
|
||||
hi IndentGuidesEven ctermbg=darkgrey
|
||||
hi IndentGuidesOdd ctermbg=black
|
||||
hi IndentGuidesEven ctermbg=darkgrey
|
||||
<
|
||||
|
||||
Alternatively, when `set background=light` is used, the following highlight
|
||||
colors will be defined:
|
||||
>
|
||||
hi IndentGuidesEven ctermbg=lightgrey
|
||||
hi IndentGuidesOdd ctermbg=white
|
||||
hi IndentGuidesEven ctermbg=lightgrey
|
||||
<
|
||||
|
||||
If for some reason it's incorrectly defining light highlight colors instead of
|
||||
@@ -186,8 +257,8 @@ Why did I build this plugin?~
|
||||
* I wanted to learn me some VimL.
|
||||
|
||||
Links:~
|
||||
* Github: https://github.com/nathanaelkane/vim-indent-guides
|
||||
* Bugs & Issues: https://github.com/nathanaelkane/vim-indent-guides/issues
|
||||
* Github: https://github.com/preservim/vim-indent-guides
|
||||
* Bugs & Issues: https://github.com/preservim/vim-indent-guides/issues
|
||||
|
||||
Credits:~
|
||||
* Matt Wozniski (godlygeek) for letting me use the list of color names and
|
||||
@@ -196,13 +267,51 @@ Credits:~
|
||||
Contact:~
|
||||
* Twitter: @nathanaelkane
|
||||
* Email: <nathanaelkane AT gmail DOT com>
|
||||
* IRC: nate- on Freenode (I usually idle in the #vim channel)
|
||||
|
||||
Bug reports, feedback, suggestions etc are welcomed.
|
||||
|
||||
==============================================================================
|
||||
7. CHANGELOG *indent-guides-changelog*
|
||||
|
||||
1.8 (pending release)~
|
||||
* Allow exclude files with no 'filetype' set (thanks @noscript).
|
||||
* Added option g:|indent_guides_soft_pattern| to control the pattern for
|
||||
soft indentation (thanks @noscript).
|
||||
* Added option g:|indent_guides_default_mapping| to control whether the
|
||||
default mapping (<Leader>ig) gets set (thanks @suy).
|
||||
* Set size of indent guide to `tabstop` value when `shiftwidth=0` or
|
||||
`noexpandtab` is used (thanks @darkfeline and @wilywampa).
|
||||
* Don't load plugin in unsupported versions of Vim (thanks @dersaidin).
|
||||
* Added option g:|indent_guides_tab_guides| to control whether tabs are
|
||||
considered as indention (thanks @amerlyq).
|
||||
|
||||
1.7~
|
||||
* Added way to override the default mapping (thanks @xuhdev).
|
||||
* Added option g:|indent_guides_exclude_filetypes| to specify a list of
|
||||
filetypes to disable the plugin for.
|
||||
* Disable the plugin when in a diff.
|
||||
* Various bug fixes.
|
||||
|
||||
1.6~
|
||||
* Added option g:|indent_guides_space_guides| to control whether spaces are
|
||||
considered as indention (thanks @scoz).
|
||||
* Added 'doc/tags' to gitignore (thanks @lenniboy).
|
||||
* Fixed E803 ID not found spam (thanks @mutewinter).
|
||||
* Fixed str2float issue with Vim 7.1 (thanks @acx0).
|
||||
|
||||
1.5~
|
||||
* Added highlight support for files with a mixture of tab and space indent
|
||||
styles (thanks @graywh).
|
||||
* Added -bar to all the :commands so they can chain with other :commands
|
||||
(thanks @graywh).
|
||||
* No longer overriding pre-defined custom highlight colors (thanks @graywh).
|
||||
* Using str2float to work around a float bug in some versions of Vim 7.2
|
||||
(thanks @voidus).
|
||||
|
||||
1.4~
|
||||
* Added the new plugin option g:|indent_guides_enable_on_vim_startup|.
|
||||
* Improved Windows support.
|
||||
|
||||
1.3~
|
||||
* Changed the default value of g:|indent_guides_color_change_percent| to 10.
|
||||
* Added support for gVim themes that don't specify a `hi Normal guibg`
|
||||
@@ -229,7 +338,7 @@ Bug reports, feedback, suggestions etc are welcomed.
|
||||
The MIT Licence
|
||||
http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
Copyright (c) 2010-2011 Nate Kane
|
||||
Copyright (c) 2010-2013 Nate Kane
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -250,4 +359,3 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
vim:tw=78:ts=2:ft=help:norl:
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
" Author: Nate Kane <nathanaelkane AT gmail DOT com>
|
||||
" Homepage: http://github.com/nathanaelkane/vim-indent-guides
|
||||
" Homepage: http://github.com/preservim/vim-indent-guides
|
||||
|
||||
" Do not load if vim is too old
|
||||
if (v:version == 701 && !exists('*matchadd')) || (v:version < 701)
|
||||
finish
|
||||
endif
|
||||
|
||||
if exists('g:loaded_indent_guides') || &cp
|
||||
finish
|
||||
@@ -20,9 +25,9 @@ function! s:IndentGuidesDisable()
|
||||
endfunction
|
||||
|
||||
" Commands
|
||||
command! IndentGuidesToggle call s:IndentGuidesToggle()
|
||||
command! IndentGuidesEnable call s:IndentGuidesEnable()
|
||||
command! IndentGuidesDisable call s:IndentGuidesDisable()
|
||||
command! -bar IndentGuidesToggle call s:IndentGuidesToggle()
|
||||
command! -bar IndentGuidesEnable call s:IndentGuidesEnable()
|
||||
command! -bar IndentGuidesDisable call s:IndentGuidesDisable()
|
||||
|
||||
"
|
||||
" Initializes a given variable to a given value. The variable is only
|
||||
@@ -30,7 +35,7 @@ command! IndentGuidesDisable call s:IndentGuidesDisable()
|
||||
"
|
||||
function s:InitVariable(var, value)
|
||||
if !exists(a:var)
|
||||
if type(a:var) == type("")
|
||||
if type(a:value) == type('')
|
||||
exec 'let ' . a:var . ' = ' . "'" . a:value . "'"
|
||||
else
|
||||
exec 'let ' . a:var . ' = ' . a:value
|
||||
@@ -45,19 +50,46 @@ let g:indent_guides_color_hex_guibg_pattern = 'guibg=\zs' . g:indent_guides_col
|
||||
let g:indent_guides_color_name_guibg_pattern = "guibg='\\?\\zs[0-9A-Za-z ]\\+\\ze'\\?"
|
||||
|
||||
" Configurable global variables
|
||||
call s:InitVariable('g:indent_guides_indent_levels', 30)
|
||||
call s:InitVariable('g:indent_guides_auto_colors', 1 )
|
||||
call s:InitVariable('g:indent_guides_indent_levels', 30)
|
||||
call s:InitVariable('g:indent_guides_auto_colors', 1)
|
||||
call s:InitVariable('g:indent_guides_color_change_percent', 10) " ie. 10%
|
||||
call s:InitVariable('g:indent_guides_guide_size', 0 )
|
||||
call s:InitVariable('g:indent_guides_start_level', 1 )
|
||||
call s:InitVariable('g:indent_guides_debug', 0 )
|
||||
call s:InitVariable('g:indent_guides_guide_size', 0)
|
||||
call s:InitVariable('g:indent_guides_start_level', 1)
|
||||
call s:InitVariable('g:indent_guides_enable_on_vim_startup', 0)
|
||||
call s:InitVariable('g:indent_guides_debug', 0)
|
||||
call s:InitVariable('g:indent_guides_space_guides', 1)
|
||||
call s:InitVariable('g:indent_guides_tab_guides', 1)
|
||||
call s:InitVariable('g:indent_guides_soft_pattern', '\s')
|
||||
call s:InitVariable('g:indent_guides_default_mapping', 1)
|
||||
|
||||
if !exists('g:indent_guides_exclude_filetypes')
|
||||
let g:indent_guides_exclude_filetypes = ['help']
|
||||
endif
|
||||
|
||||
" Default mapping
|
||||
nmap <Leader>ig :IndentGuidesToggle<CR>
|
||||
if !hasmapto('<Plug>IndentGuidesToggle', 'n') && maparg('<Leader>ig', 'n') ==# ''
|
||||
\ && g:indent_guides_default_mapping != 0
|
||||
nmap <silent><unique> <Leader>ig <Plug>IndentGuidesToggle
|
||||
endif
|
||||
|
||||
" Plug mappings
|
||||
nnoremap <unique><script> <Plug>IndentGuidesToggle :IndentGuidesToggle<CR>
|
||||
nnoremap <unique><script> <Plug>IndentGuidesEnable :IndentGuidesEnable<CR>
|
||||
nnoremap <unique><script> <Plug>IndentGuidesDisable :IndentGuidesDisable<CR>
|
||||
|
||||
" Auto commands
|
||||
augroup indent_guides
|
||||
autocmd!
|
||||
autocmd BufEnter,WinEnter * call indent_guides#process_autocmds()
|
||||
augroup END
|
||||
|
||||
if g:indent_guides_enable_on_vim_startup
|
||||
autocmd VimEnter * :IndentGuidesEnable
|
||||
endif
|
||||
|
||||
autocmd BufEnter,WinEnter,FileType * call indent_guides#process_autocmds()
|
||||
if (v:version == 704 && has('patch786')) || (v:version > 704)
|
||||
autocmd OptionSet tabstop,shiftwidth,expandtab call indent_guides#process_autocmds()
|
||||
endif
|
||||
|
||||
" Trigger BufEnter and process modelines.
|
||||
autocmd ColorScheme * doautocmd indent_guides BufEnter
|
||||
augroup END
|
||||
|
||||
47
test-files/test-ts2sw0et.txt
Normal file
47
test-files/test-ts2sw0et.txt
Normal file
@@ -0,0 +1,47 @@
|
||||
vim:tw=78:ts=2:sw=0:et:nolist
|
||||
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
@@ -1,4 +1,4 @@
|
||||
vim:tw=78:ts=2:sw=2:et
|
||||
vim:tw=78:ts=2:sw=2:et:nolist
|
||||
|
||||
test
|
||||
test
|
||||
@@ -23,3 +23,25 @@ test
|
||||
test
|
||||
test
|
||||
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
|
||||
@@ -1,4 +1,27 @@
|
||||
vim:tw=78:ts=2:sw=2:noet
|
||||
vim:tw=78:ts=2:sw=2:noet:nolist
|
||||
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
|
||||
test
|
||||
test
|
||||
@@ -22,4 +45,3 @@ test
|
||||
test
|
||||
test
|
||||
test
|
||||
|
||||
|
||||
24
test-files/test-ts2sw4noet.txt
Normal file
24
test-files/test-ts2sw4noet.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
vim:tw=78:ts=2:sw=4:noet:nolist
|
||||
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
@@ -1,4 +1,4 @@
|
||||
vim:tw=78:ts=4:sw=4:et
|
||||
vim:tw=78:ts=4:sw=4:et:nolist
|
||||
|
||||
test
|
||||
test
|
||||
@@ -23,3 +23,25 @@ test
|
||||
test
|
||||
test
|
||||
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
|
||||
@@ -1,4 +1,27 @@
|
||||
vim:tw=78:ts=4:sw=4:noet
|
||||
vim:tw=78:ts=4:sw=4:noet:nolist
|
||||
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
|
||||
test
|
||||
test
|
||||
@@ -22,4 +45,3 @@ test
|
||||
test
|
||||
test
|
||||
test
|
||||
|
||||
|
||||
24
test-files/test-ts8sw2noet.txt
Normal file
24
test-files/test-ts8sw2noet.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
vim:tw=78:ts=8:sw=2:noet:nolist
|
||||
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
@@ -1,4 +1,4 @@
|
||||
vim:tw=78:ts=8:sw=8:et
|
||||
vim:tw=78:ts=8:sw=8:et:nolist
|
||||
|
||||
test
|
||||
test
|
||||
@@ -23,3 +23,25 @@ test
|
||||
test
|
||||
test
|
||||
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
|
||||
@@ -1,4 +1,27 @@
|
||||
vim:tw=78:ts=8:sw=8:noet
|
||||
vim:tw=78:ts=8:sw=8:noet:nolist
|
||||
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
test
|
||||
|
||||
test
|
||||
test
|
||||
@@ -22,4 +45,3 @@ test
|
||||
test
|
||||
test
|
||||
test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user