thaerkh / vim-indentguides

📐 Simple indentation guides for your buffers
Apache License 2.0
135 stars 11 forks source link

Use 2 spaces and starts on first column #20

Open gabriel-del opened 4 years ago

gabriel-del commented 4 years ago

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.

jmehnle commented 3 years ago

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

mrdonlee commented 2 years ago

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)