Closed ghost closed 6 years ago
I think you are using tab
to indent the code. IndentLine only supports using space.
The solution from #111 seems to work well enough in supporting tabs (set list lcs=tab:\|\
in .vimrc). However, setting my .vimrc to use spaces and converting the file only results in the indent lines no longer appearing. (Somewhat related: :IndentLinesToggle
fails, claiming it is "Not an editor command")
Updated section of .vimrc:
set shiftwidth=4
set tabstop=4
set conceallevel=1
let g:indentLine_conceallevel=1
let g:indentLine_setColors = 0
let g:indentLine_bgcolor_gui = '#2B2B2B'
let g:indentLine_char = '|'
Can not reproduce.
It's likely a problem with my attempt at installing the plugin. (I'm still very new to vim)
Is it enough to have after/plugin/indentLine.vim
in ~/.vim?
To answer my own question: No it is not.
Plugin has been moved to ~/.vim/plugin/indentLines.vim
and shows up when :script
has been run.
Commands now succeed, yet still no visible outcome.
No changes have been made to ~/.vimrc
Please refer to https://github.com/Yggdroot/indentLine/issues/59.
Having read through #59, these are my updated relevant lines in .vimrc:
set tabstop=4
set shiftwidth=4
let g:indentLine_setColors = 0
let g:indentLine_char = '|'
set conceallevel=1
let g:indentLine_conceallevel=1
autocmd VimEnter,WinEnter,BufNewFile,BufRead,BufEnter,TabEnter * IndentLinesReset
syntax enable
However, the only time I have been able to see indentation lines are using tabs, where they were the wrong colour. (set list lcs=tab:\|\
causes the indents to appear)
Can you make sure that every character in your code is not tab
?
I think you even don't know the difference between tab and space.
I've found the solution, sorry for being annoying.
My .vimrc was set to
set tabstop=4
set shiftwidth=4
which caused the tab to not correspond to spaces, and what I should have used was
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
Thank you for your help
Hello, I have set up MacVim with this plugin (mvim 8.1 from homebrew,
has("Conceal")
returns 1). It works well, however, theConceal
highlight group doesn't seem to apply to the indent lines or tabs, as shown:(Note the difference in highlight between the indentation and both Normal and Conceal)
The relevant section of my .vimrc are as follows:
I would like to know if there is a problem with the way I have set up the plugin, or what highlight group is being used for the indentation so I can change it.
Thanks in advance.