Closed ubmarco closed 4 years ago
@ubmarco Thanks for issue. i will look at it. By the way I have not used them. It looks good, but have you tested the performance of these two plugins in large files, will it cause any lag?
The performance is a good point. I did not try the plugins yet.
I'm just tired of pressing <C-g>
to see where I am. The lower right corner has the percentage, but it's not easy to identify quickly for my human eyes/brain.
A rough graphical indicator would be cool. An option would maybe to exchange the 3 horizontal lines:
with the drzel/vim-line-no-indicator
. I actually don't know what they mean, is that just a separator?
It is just an identifier. There is always such a prompt on emacs modeline, with these 2 vim plugins I will try to achieve a similar effect on spaceline.vim
However, I am very worried about the performance of these two plugins in large files, so I will add an option to control whether it is enabled.
@ubmarco I would like to add this https://github.com/drzel/vim-line-no-indicator support. what do you think?
@ubmarco Now it look like this. ![Uploading test3.gif…]()
Wow, thanks a lot for your fast-as-lightning response. That's a cool addition.
Having an option to disable the indicator is a good idea. I will try it on larger files and come back to you. First experiments look good. How often does the statusline upate?
Maybe the feature can be disabled automatically when files grow over a certain line count based on practical experience.
However, I think there is still a bug in autoload/spaceline/spaceline.vim
that I had to fix locally.
The variable spaceline_no_indicator_chars
is referred to as line_no_indicator_chars
which leads to errors when displaying the statusline. I sent a PR https://github.com/hardcoreplayers/spaceline.vim/pull/18
Btw, what do you think about options to let users configure the location of elements in the statusline?
The code always starts on the left side, so the indicator is easier to spot if it were on the left. I also would not need the percentage indicator anymore (can press <C-g>
for this).
However I know opinions might differ from user to user, so a configuration would be awesome for changing positions and deactivating elements.
Oh I see, my PR is already outdated :)
@ubmarco Sorry. I update a wrong version. please update now.
@ubmarco This is option spaceline_scroll_bar
is a list
" default
let g:spaceline_scroll_bar_chars= [
\ ' ', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'
\ ]
let g:spaceline_scroll_bar_chars= [
\ ' ', '▏ ', '▎ ', '▍ ', '▌ ',
\ '▋ ', '▊ ', '▉ ', '█ ', '█▏ ',
\ '█▎ ', '█▍ ', '█▌ ', '█▋ ', '█▊ ',
\ '█▉ ', '██ ', '██▏', '██▎', '██▍',
\ '██▌', '██▋', '██▊', '██▉', '███'
\ ]
you can custom it like this.
Thanks for the update. I tried to set
let g:spaceline_scroll_bar_chars= [
\ ' ', '▏ ', '▎ ', '▍ ', '▌ ',
\ '▋ ', '▊ ', '▉ ', '█ ', '█▏ ',
\ '█▎ ', '█▍ ', '█▌ ', '█▋ ', '█▊ ',
\ '█▉ ', '██ ', '██▏', '██▎', '██▍',
\ '██▌', '██▋', '██▊', '██▉', '███'
\ ]
in my ~/.thinkvim.d/init.vim
but it don't work, it's still at default. When echoing the variable it shows the default value. What am I doing wrong?
@ubmarco Please update i had fixed.
Thanks a lot for your support and time, it works now.
@ubmarco No thanks. When i have time. i will rewrite this plugin . its hard to custom function and the code of now looks like shit..
Hi, is it possible to add a custom section to the spaceline? I want to use either of the following plugins: https://github.com/gcavallanti/vim-noscrollbar https://github.com/drzel/vim-line-no-indicator
Btw, I'm also using
hardcoreplayers/ThinkVim
.Thanks for the support!