indentLine icon indicating copy to clipboard operation
indentLine copied to clipboard

IndentLine not working

Open veribaka opened this issue 6 years ago • 26 comments

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)

veribaka avatar Apr 03 '19 10:04 veribaka

Does your code indent with space or tab?

Yggdroot avatar Apr 03 '19 13:04 Yggdroot

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

Yggdroot [email protected] 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

veribaka avatar Apr 03 '19 13:04 veribaka

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

Yggdroot avatar Apr 03 '19 14:04 Yggdroot

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

veribaka avatar Apr 03 '19 14:04 veribaka

:hi conceal

Yggdroot avatar Apr 03 '19 14:04 Yggdroot

It is the following:

:hi conceal Conceal xxx ctermfg=239 guifg=Grey30

veribaka avatar Apr 03 '19 14:04 veribaka

Is it the same as background?

Yggdroot avatar Apr 04 '19 01:04 Yggdroot

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?

veribaka avatar Apr 04 '19 08:04 veribaka

not working +1

MonkeyInWind0 avatar Apr 16 '19 06:04 MonkeyInWind0

macos vim 8.0 not working +1

narutohinata avatar May 03 '19 04:05 narutohinata

macos vim 8.1 not working +1 use theme gruvbox

set background=dark

hi conceal Conceal xxx ctermfg=109 guifg=#504945

alpha-baby avatar May 15 '19 03:05 alpha-baby

image

image When I run 'IndentLinesToggle'.

MonkeyInWind0 avatar May 28 '19 03:05 MonkeyInWind0

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

:(

avivajpeyi avatar Aug 10 '19 06:08 avivajpeyi

image

image When I run 'IndentLinesToggle'.

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

Yggdroot avatar Aug 20 '19 03:08 Yggdroot

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.

volker-fr avatar Sep 23 '19 17:09 volker-fr

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.

guoyunci avatar Sep 25 '19 07:09 guoyunci

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.

Yggdroot avatar Sep 25 '19 07:09 Yggdroot

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.

killerqhk avatar Oct 11 '19 17:10 killerqhk

@killerqhk set expandtab

Yggdroot avatar Oct 12 '19 04:10 Yggdroot

macos vim 8.0 not working +1

samesame

link-ding avatar May 29 '20 16:05 link-ding

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 [email protected]
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

robertwt7 avatar Jul 23 '20 00:07 robertwt7

-conceal +lispindent +reltime +vreplace

Yggdroot avatar Jul 23 '20 01:07 Yggdroot

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.)

OmanF avatar Aug 15 '20 15:08 OmanF

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.

vhristev avatar Nov 09 '20 11:11 vhristev

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

KyrillosAkram avatar Jan 13 '22 23:01 KyrillosAkram

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?

rbosneag avatar Jan 22 '22 13:01 rbosneag