Yggdroot / indentLine

A vim plugin to display the indention levels with thin vertical lines
MIT License
4.13k stars 227 forks source link

IndentLine not working #269

Open veribaka opened 5 years ago

veribaka commented 5 years ago

I think I've read all the threads of possible solutions, including #59. I installed via vim-plug, no dice.

My vimrc:

" Specify a directory for plugins " - For Neovim: ~/.local/share/nvim/plugged " - Avoid using standard Vim directory names like 'plugin' call plug#begin('~/.vim/plugged')

" Line indentations Plug 'Yggdroot/indentLine'

"Plug 'junegunn/seoul256.vim' "Plug 'junegunn/goyo.vim' "Plug 'junegunn/limelight.vim' "Plug 'junegunn/vim-plug'

" Powerline "Plug 'itchyny/lightline.vim'

call plug#end()

"let g:indentLine_char = '|' ":colo desert ":set number "set laststatus=2

The result from :script

1: /usr/share/vim/vimrc 2: /usr/share/vim/vim80/debian.vim 3: /usr/share/vim/vim80/syntax/syntax.vim 4: /usr/share/vim/vim80/syntax/synload.vim 5: /usr/share/vim/vim80/syntax/syncolor.vim 6: /usr/share/vim/vim80/filetype.vim 7: ~/.vim/vimrc 8: ~/.vim/autoload/plug.vim 9: /usr/share/vim/vim80/ftoff.vim 10: /usr/share/vim/vim80/ftplugin.vim 11: /usr/share/vim/vim80/indent.vim 12: /usr/share/vim/vim80/plugin/getscriptPlugin.vim 13: /usr/share/vim/vim80/plugin/gzip.vim 14: /usr/share/vim/vim80/plugin/logiPat.vim 15: /usr/share/vim/vim80/plugin/manpager.vim 16: /usr/share/vim/vim80/plugin/matchparen.vim 17: /usr/share/vim/vim80/plugin/netrwPlugin.vim 18: /usr/share/vim/vim80/plugin/rrhelper.vim 19: /usr/share/vim/vim80/plugin/spellfile.vim 20: /usr/share/vim/vim80/plugin/tarPlugin.vim 21: /usr/share/vim/vim80/plugin/tohtml.vim 22: /usr/share/vim/vim80/plugin/vimballPlugin.vim 23: /usr/share/vim/vim80/plugin/zipPlugin.vim 24: ~/.vim/plugged/indentLine/after/plugin/indentLine.vim

:echo has("conceal")

1

And last but not least, my vim version

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 10 2018 21:31:58)

Yggdroot commented 5 years ago

Does your code indent with space or tab?

veribaka commented 5 years ago

I have created a test file where I use both for this purpose.

Yggdroot notifications@github.com escreveu no dia quarta, 3/04/2019 à(s) 15:16:

Does your code indent with space or tab?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Yggdroot/indentLine/issues/269#issuecomment-479484330, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwk4z1uW_6g6z9VaNQRgB_yuqgUi79bks5vdKmZgaJpZM4caMnJ .

-- "Rasgai meus versos, viva a liberdade!" - Manuel Maria Hedoïs du Bocage

Yggdroot commented 5 years ago

What is the color of conceal? Is it the same as background?

veribaka commented 5 years ago

I have not changed that setting, so it should be the default. How can I verify this?

Yggdroot commented 5 years ago

:hi conceal

veribaka commented 5 years ago

It is the following:

:hi conceal Conceal xxx ctermfg=239 guifg=Grey30

Yggdroot commented 5 years ago

Is it the same as background?

veribaka commented 5 years ago

I tried changing the theme, setting light background, setting dark background... No dice so far.

Sorry, I'm rather novice at this - is it possible that my combination of terminator + zsh has something to do with this?

MonkeyInWind commented 5 years ago

not working +1

narutohinata commented 5 years ago

macos vim 8.0 not working +1

alpha-baby commented 5 years ago

macos vim 8.1 not working +1 use theme gruvbox

set background=dark

hi conceal Conceal xxx ctermfg=109 guifg=#504945

MonkeyInWind commented 5 years ago

image

image When I run 'IndentLinesToggle'.

avivajpeyi commented 4 years ago

Im getting the same issue as @MonkeyInWind -- installed with PlugInstall, shows up as installed, but get "Not an editor command: IndentLinesToggle"

:(

Yggdroot commented 4 years ago

image

image When I run 'IndentLinesToggle'.

What is the output of vim --version | grep conceal ?

volker-fr commented 4 years ago

Same issue on macOS. vim is either from the base install or xcode.

$ /usr/bin/vim --version | grep concea
-conceal         +libcall         -profile         +visualextra

Culprit doesn't seem to be that it doesn't work if vim doesn't support conceal: https://github.com/Yggdroot/indentLine/blob/master/after/plugin/indentLine.vim#L8

Installing vim from homebrew works. homebrew vim version comes with +conceal.

guoyunci commented 4 years ago

I tried to answer, English is not very good, everyone tried to read. I installed this plugin today, and then wrote some php code to see the effect, found no change, I also thought that there was no installation or configuration problem at the beginning. After I determined that there were no problems with the installation and configuration, I started looking for problems from the code format.

  1. I copied the python code from https://en.wikibooks.org/wiki/Algorithm_Implementation/Sorting/Quicksort#Python.
  2. https://en.wikibooks.org/wiki/Algorithm_Implementation/Sorting/Quicksort#PHP copied some php code.
  3. Test separately, this time indentline can be displayed normally. Then use gg=G, format, and find that the indentline of the PHP code is gone. Python is still there.

macos vim 8.1 and centos7 vim8.1 , I tested them all.

Everyone can try it. I found this plugin to support python better, the other did not test.

Yggdroot commented 4 years ago

I tried to answer, English is not very good, everyone tried to read. I installed this plugin today, and then wrote some php code to see the effect, found no change, I also thought that there was no installation or configuration problem at the beginning. After I determined that there were no problems with the installation and configuration, I started looking for problems from the code format.

  1. I copied the python code from https://en.wikibooks.org/wiki/Algorithm_Implementation/Sorting/Quicksort#Python.
  2. https://en.wikibooks.org/wiki/Algorithm_Implementation/Sorting/Quicksort#PHP copied some php code.
  3. Test separately, this time indentline can be displayed normally. Then use gg=G, format, and find that the indentline of the PHP code is gone. Python is still there.

macos vim 8.1 and centos7 vim8.1 , I tested them all.

Everyone can try it. I found this plugin to support python better, the other did not test.

indentLine works for every language the same. After gg=G, maybe the spaces in your code are converted to tabs, it depends on your configuration.

killerqhk commented 4 years ago

indentLine works for every language the same. After gg=G, maybe the spaces in your code are converted to tabs, it depends on your configuration.

Hello, could you please show me how to setup this. Sorry I'm new to Linux.

Yggdroot commented 4 years ago

@killerqhk set expandtab

link-ding commented 4 years ago

macos vim 8.0 not working +1

samesame

robertwt7 commented 4 years ago

I can confirm that this is not working, even after I set let g:indentLine_setConceal = 0

VIM - Vi IMproved 8.1 (2018 May 18, compiled Jul  5 2020 01:22:14)
macOS version
Included patches: 1-503, 505-680, 682-2292
Compiled by root@apple.com
Normal version without GUI.  Features included (+) or not (-):
+acl               -farsi             -mouse_sysmouse    -tag_any_white
-arabic            +file_in_path      -mouse_urxvt       -tcl
+autocmd           +find_in_path      +mouse_xterm       -termguicolors
+autochdir         +float             +multi_byte        +terminal
-autoservername    +folding           +multi_lang        +terminfo
-balloon_eval      -footer            -mzscheme          +termresponse
-balloon_eval_term +fork()            +netbeans_intg     +textobjects
-browse            -gettext           +num64             +textprop
+builtin_terms     -hangul_input      +packages          +timers
+byte_offset       +iconv             +path_extra        +title
+channel           +insert_expand     -perl              -toolbar
+cindent           +job               +persistent_undo   +user_commands
-clientserver      +jumplist          +postscript        -vartabs
+clipboard         -keymap            +printer           +vertsplit
+cmdline_compl     +lambda            -profile           +virtualedit
+cmdline_hist      -langmap           +python/dyn        +visual
+cmdline_info      +libcall           -python3           +visualextra
+comments          +linebreak         +quickfix          +viminfo
-conceal           +lispindent        +reltime           +vreplace
+cryptv            +listcmds          -rightleft         +wildignore
+cscope            +localmap          +ruby/dyn          +wildmenu
+cursorbind        -lua               +scrollbind        +windows
+cursorshape       +menu              +signs             +writebackup
+dialog_con        +mksession         +smartindent       -X11
+diff              +modify_fname      -sound             -xfontset
+digraphs          +mouse             +spell             -xim
-dnd               -mouseshape        +startuptime       -xpm
-ebcdic            -mouse_dec         +statusline        -xsmp
-emacs_tags        -mouse_gpm         -sun_workshop      -xterm_clipboard
+eval              -mouse_jsbterm     +syntax            -xterm_save
+ex_extra          -mouse_netterm     +tag_binary
+extra_search      +mouse_sgr         -tag_old_static

Currently moved to neovim in mac for it to work

Yggdroot commented 4 years ago

-conceal +lispindent +reltime +vreplace

OmanF commented 3 years ago

NeoVim 0.4.4 on Linux. Not working too.

Even after let g:indentLine_setConceal = 0 and making sure the conceal color is not the same as the editor background. No indentation markers (using only ASCII chars in the indentLine_char_list, so no worries about patched fonts, etc.)

vhristev commented 3 years ago

Same issue here : MacOSX: 10.15.5 iTerm: 3.312 tmux: tmux 3.1c

~/Desktop/ » v --version                                      
NVIM v0.4.4
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20200808-89283-1us0ytm/neovim-0.4.4/build/config -I/tmp/neovim-20200808-89283-1us0ytm/neovim-0.4.4/src -I/usr/local/include -I/tmp/neovim-20200808-89283-1us0ytm/neovim-0.4.4/deps-build/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20200808-89283-1us0ytm/neovim-0.4.4/build/src/nvim/auto -I/tmp/neovim-20200808-89283-1us0ytm/neovim-0.4.4/build/include
Compiled by brew@Catalina

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.4.4/share/nvim"

Run :checkhealth for more info
:echo conceal
1
:hi conceal
Conceal        xxx ctermfg=239 guifg=Grey30 guibg=#FF5F00

I tried all kind of options: current one:

let g:indentLine_char = 'c'
" let g:indentLine_char_list = ['|', '¦', '┆', '┊']
let g:indentLine_concealcursor = 'inc'
let g:indentLine_conceallevel = 1
let g:indentLine_bgcolor_gui = '#FF5F00'
let g:indentLine_color_term = 239

I tried changing colorscheme but lines do not show up.

KyrillosAkram commented 2 years ago

this worked for me and I think this should close the issue https://vi.stackexchange.com/questions/7975/how-can-i-change-the-indent-size

rbosneag commented 2 years ago

this worked for me and I think this should close the issue https://vi.stackexchange.com/questions/7975/how-can-i-change-the-indent-size

How does that fix the IndentLinesToggle issue that some of us have? What is your output for running IndentLinesToggle in vim?