vim-indentguides icon indicating copy to clipboard operation
vim-indentguides copied to clipboard

Use 2 spaces and starts on first column

Open gabriel-del opened this issue 5 years ago • 2 comments

Hi! Thanks for the script!

I was wanting to put 2 columns space, so I worked around putting: let g:indentguides_guidewidth = 2 after line 34: let g:indentguides_guidewidth = &l:shiftwidth

So, I wanted it to start from the first column, then I commented the lines: 24: if g:indentguides_firstlevel and 26: endif

I don't know vim enough to correct it the right way, It would be nice if someone helped making this option.

gabriel-del avatar Jan 30 '20 20:01 gabriel-del

I, too, am looking for a way to use different indentation widths, such as 2 spaces. Is there a built-in way?

jmehnle avatar Oct 28 '21 18:10 jmehnle

Hi! Thanks for the script!

I was wanting to put 2 columns space, so I worked around putting: let g:indentguides_guidewidth = 2 after line 34: let g:indentguides_guidewidth = &l:shiftwidth

So, I wanted it to start from the first column, then I commented the lines: 24: if g:indentguides_firstlevel and 26: endif

I don't know vim enough to correct it the right way, It would be nice if someone helped making this option.

Do you mean this @gabriel-del ,

function! s:ToggleIndentGuides(user_initiated)
  let b:toggle_indentguides = get(b:, 'toggle_indentguides', 1)
  let g:indentguides_guidewidth = &l:shiftwidth
  let g:indentguides_guidewidth = 2

And for the case of first line you can do this in line number 6,

let g:indentguides_firstlevel = get(g:, 'indentguides_firstlevel', 1)

mrdonlee avatar Dec 31 '21 05:12 mrdonlee