yggdroot / indentline Goto Github PK
View Code? Open in Web Editor NEWA vim plugin to display the indention levels with thin vertical lines
License: MIT License
A vim plugin to display the indention levels with thin vertical lines
License: MIT License
Is there a way to turn the plugin off for a certain buffer? I would like it off for vimdiff, but on for everything else.
Thanks.
hi, I got a problem, when I use mouse select and copy the code in the terminal, and paste to another file, the indent sign '|' was copied & pasted too.(use yy&p is fine)
I wander if it is possible to avoid that.
thx
Would be something like this possible?
http://stackoverflow.com/questions/20228846/vim-spaces-tab-indentation
Reference: preservim/vim-indent-guides#41 (comment)
For example, the section you're in will be slightly brighter, and other indent guides not as bright... Like in Sublime text. It'd be nice to highlight the indent guides really bright to find matching brackets like in notepad++.
When I use tabs and spaces mixed, the color of the guides does not seem to be the same for both those options.
For one thing, it seems the character used need to be specified using both the following lines:
let g:indentLine_char = '┆'
set list lcs=tab:\┆\
otherwise it does not get consistently set. What am I missing?
Hi,
I'm a indentLine user and in there is a line set conceallevel=1
and set concealcursor=inc
in indentLine.vim
, making some characters always invisible when i'm editing vimwiki or LaTeX file.
I'm a mac user with vim 7.3. can't figure out why it doesn't work in the terminal
Removing line exec 'syn match IndentLine /\%(^\)\@! \{'.(space-1).'}\zs / containedin=ALL contained conceal cchar=' . g:indentLine_char
in this e31f896 commit breaks slim and haml syntax.
Maybe it breaks syntax highlighting for other types as well, I didn't heck.
This seems to make my vim slow, especially on bigger files. Why might that be?
Is it updating on every cursor/line movement?
How to replicate:
Assume we have 2 files (a.rb and b.rb)
When using ultisnips with indentLine, navigating between different placeholders is noticeably slowworm, than without the plugin. That reproduces even when syntax highlighting is off.
I use the base16-vim railscasts theme. It defines a color for the Conceal
group, which overrides the highlighting that indentLine
defines. The only way I found to fix that problem is to fork the theme and hardcode the color I want in it.
Isn't there a way to prevent the theme from overriding the indent lines color?
I have in my vimrc disabled indentLine for NERD_Tree, but it still breaks NERD_Tree's syntax highlighting:
It would be nice to have some example configurations shown in the Readme along with screenshots. I'll do that when i have spare some time ;-)
Firstly, thought I should let you know I really enjoy the plugin. I used sublime text at one point and thought these unobtrusive indent lines were a great feature. I'm glad I have them in vim!
You currently have the variables g:indentLine_color_term
and g:indentLine_color_gui
to set the foreground color of indentLine's character. You also allow the cursorline
to appear over the indentLine character with the variable g:indentLine_noConcealCursor
.
Is it possible, with g:indentLine_noConcealCursor=0
, to simply change the background color of the indentLine symbol on the cursorline to the CursorLine
color group? It would be a cleaner look.
This will allow easier updating when the plugin is used as a submodule
i opened a 8000 line file and vim hung for about 8 seconds (running on a core i7).
Minimal example:
echo "syntax on" > foo
vim -u path/to/some/texfile
Now source the plugin, go into insert mode and type:
$\le
Results in one empty char and a less-equal sign allthough the typed char are still existent and can be deleted.
Observed on Archlinux with Vim 7.3.875
edit echo instead of cat
This plugin works in my Ubuntu 12.04, but unfortunately not working in Mac OS.
These two lines overrides my setting in vimrc.
I am not so familiar with vim. Is it necessary for this plugin?
Could you remove these two lines or change them to optional settings?
Thank you.
Sometimes I use sublime text, I love indexLine very much.
Today, I open the vimwiki to write my blog, but it does not work as usual.
After a long time test, I find the default configuration g:indentLine_noConcealCursor in indexLine lead to this, which set concealcursor=inc in my Vim without any warning.
I have "g:indentLine_enabled = 0" in my .vimrc
but the plugin activates itself when setting a filetype after opening a file.
setting conceallevel=1 in help buffers makes the concealedchars take up space--but they should be hidden. I don't think anyone needs to see indent levels in help buffers, so indentLine should ignore help buffers.
Vim patch 7.3.629 introduces new feature: shiftwidth follows tabstop value if set to 0. Patch 7.3.694 adds shiftwidth()
function to get effective shiftwidth value.
As SetIndentLine()
uses l:shiftwidth
value (0 in my case), error E726 ("Stride is zero") is caught after vim buffer is loaded. Minimal vimrc to reproduce (I use Vim 7.4):
set expandtab
set tabstop=4
if v:version < 703 || (v:version == 703 && !has('patch629'))
set shiftwidth=4
else
set shiftwidth=0
endif
Simple solution: use (sw==0 ? ts : sw)
logic.
Complex solution: found here (somewhat overblown).
I'm not familiar with vimscript to fix it.
When you use set listchars=tab:│\
in order to show tabs along indentLine, the result is not very pretty. This is because indentLine does not show the first indentation level:
In general, i think it is good not to show the first indentation level, but listchars
doesn't seem to provide this option. (Please correct me if i'm wrong). So i'd like to either be able to display the first indentation level with spaces, or to not display the first indentation level with tabs.
I can think of a few possibilities to address this issue:
g:indentLine_showFirstIndentLevel
, default 0
g:indentLine_minimumIndentLevel
, default 1
I have
hi Conceal ctermfg=black ctermbg=NONE
in my .vimrc but the indentation lines always comes up in white. From looking at the code you have this line:
https://github.com/Yggdroot/indentLine/blob/master/after/plugin/indentLine.vim#L54
Which overrides the highlight (and it seems that this highlight overrides what I have in my vimrc.)
So either your README is wrong in suggesting the usage of hi Conceal to select color which will be overridden instead of setting the g:indentLine_color_term
variable, which will simply be overridden or you should not override the Conceal color at line 54 there.
I don't know enough vim-script to be sure. I guess this might've been a trivial fix for you so...
With let g:indentLine_enabled = 0
, indents still show in Vim's HELP docs.
Dear Yggdroot,
Set List, for example to show indentation lines for the tab character, renders the Set Linebreak option invalid. Thence it could be useful to have the indentation lines for the tab character as well.
The plugin also renders my Set NoList option invalid, even if invoked by an autocmd VimEnter. If explicitly setting Set List lcs=... though, these values are accepted.
Best regards and keep up the good work
EPNGH
I think it's a good idea that make the plugin enable/disable when a file is some filetype :D
I like this plugin. BTW, this plugin mess up my vim syntax highlight after updating.
To fix it, I modified SetIndentLine() from
execute 'syntax match IndentLineSpace /^\s\+/ containedin=ALL contains=IndentLine'
execute 'syntax match IndentLine / \{'.(space-1).'}\zs / contained conceal cchar=' . g:indentLine_char
execute 'syntax match IndentLine /\t\zs / contained conceal cchar=' . g:indentLine_char
to
let pattern = line('$') < g:indentLine_maxLines ? 'v' : 'c'
for i in range(space+1, space * g:indentLine_indentLevel + 1, space)
exec 'syn match IndentLine /\%(^\s\+\)\@<=\%'.i.pattern.' / containedin=ALL conceal cchar=' . g:indentLine_char
endfor
like the past version then every thing works correctly. Could you set a flag to select the one of them, or fix bug?
Thanks,
I've installed the plugin using vundle, however none of the commands are available.
I added the following to my .vimrc with no luck:
let g:indentLine_enabled = 1
let g:indentLine_loaded = 1
let g:indentLine_char = '┊'
if you edit a new file currently, then use :e command to open another file, the indent line will not work.
i make a video record with asciiio, check http://ascii.io/a/3928 for detail.
<img data-src="holder.js/260x120" alt="260x120" style="width: 260px; height: 120px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQQAAAB4CAYAAAAUn4wEAAAGQElEQVR4Xu3aPUsdWxQG4LEwKiSFTbQTsUwsRfDvp7KRVBFrEVIEsREJ+HHvHJjDODrH96ghQ9aT5nLD8rjXs/Z+3TNx5fLy8qHxhwABAv8LrAgE+4AAgU5AINgLBAjMBQSCzUCAgECwBwgQeCrghmBXECDghmAPECDghmAPECCwQMAjg+1BgIBHBnuAAAGPDPYAAQIeGewBAgQSAe8QEiU1BIoICIQig9YmgURAICRKaggUERAIRQatTQKJgEBIlNQQKCIgEIoMWpsEEgGBkCipIVBEQCAUGbQ2CSQCAiFRUkOgiIBAKDJobRJIBARCoqSGQBEBgVBk0NokkAgIhERJDYEiAgKhyKC1SSAREAiJkhoCRQQEQpFBa5NAIiAQEiU1BIoICIQig9YmgURAICRKaggUERAIRQatTQKJgEBIlNQQKCIgEIoMWpsEEgGBkCipIVBEQCAUGbQ2CSQCAiFRUkOgiIBAKDJobRJIBARCoqSGQBEBgVBk0NokkAgIhERJDYEiAgKhyKC1SSAREAiJkhoCRQQEQpFBa5NAIiAQEiU1BIoICIQig9YmgURAICRKaggUERAIRQatTQKJgEBIlNQQKCIgEIoMWpsEEgGBkCipIVBEQCAUGbQ2CSQCAiFRUkOgiIBAmOCgT09Pm4uLi/nKPn361BweHj5a6eXlZfP9+/fm/v5+9vfP1ZyfnzdnZ2fzr9vd3W329vZe3fHJyUnTft+tra1mf3//0ecka37v9by6EV84KiAQJrY5ukM3XFb/wA/DoKvtH9Th4etqXhsK/c8bBkKy5vdez8TG9s8sRyBMaJS3t7fNt2/fmru7u6Y7uP2D9PXr1+bz58/N8fFxc319/aRmZWWlOTo6atbW1uY13eHtfoKvr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ESQ2BIgICocigtUkgERAIiZIaAkUEBEKRQWuTQCIgEBIlNQSKCAiEIoPWJoFEQCAkSmoIFBEQCEUGrU0CiYBASJTUECgiIBCKDFqbBBIBgZAoqSFQREAgFBm0NgkkAgIhUVJDoIiAQCgyaG0SSAQEQqKkhkARAYFQZNDaJJAI/AcghRH8/bWtmwAAAABJRU5ErkJggg==">
I have let g:indentLine_fileTypeExclude = ['nerdtree']
in my vimrc.
but it seems doesn't work.
Im using ColorV plugin in my vim, which is a great color related plugin.
Can I disable indentLine on colorV buffer?
I am using Vim 7.4 and have this in my .vimrc
Bundle 'Yggdroot/indentLine'
When I :BundleInstall and restart I see nothing?
While I really like your plugin, it makes vim unusably slow.
wget https://raw.github.com/Yggdroot/indentLine/42cf0572926b9c415d2275e040bdcc60c33f9096/after/plugin/indentLine.vim
vim -N -u NONE -S indentLine.vim \
-c 'syntax on|help grep|wincmd L|set relativenumber|norm 60G'
Then navigate up and down using j
and k
.
Vim maxes out my 2GHz CPU and becomes unusably slow.
A slight impact on performance but definitely not maxing out the CPU and slowing vim down that much.
i found that those indents ╎╏┆┇│┃ may fit better with your great script :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.