Giter VIP home page Giter VIP logo

Comments (16)

deniciocode avatar deniciocode commented on May 18, 2024 2

It is fixed. Thx 👍

from vim.

arcticicestudio avatar arcticicestudio commented on May 18, 2024

Have you tried with a empty ~/.vimrc? The theme itself doesn't even contain the ^ character so I've no idea how to reproduce this. Is this happening every time or just in specific situations?

from vim.

deniciocode avatar deniciocode commented on May 18, 2024

Hi,

this happens all the time and only with the nord colorscheme.

Still if I empty the vimrc this is still happening.

from vim.

arcticicestudio avatar arcticicestudio commented on May 18, 2024

Can you try if this still happens when using the develop branch please? I've merged #33 some hours ago which adds basic token matching color support for CtrlP. Maybe the weird output is produced by a internal regex which needs the specific highlight group to be present on the current theme.

If this still doesn't fix it would you mind to open a issue in ctrlpvim/ctrlp.vim and link back to this issue?

Also which OS and version of Vim/NVim, shell (bash, zsh) and terminal emulator are you running?

from vim.

dylnmc avatar dylnmc commented on May 18, 2024

@arcticicestudio @DenniJensen This happened to me in gvim (I have to work in Windows at work), and the cause is that "StatusLine" and "StatusLineNC" are set to the same colors.

If you comment out call s:hi("StatusLineNC", s:nord4_gui, s:nord0_gui, s:nord8_term, "NONE", "NONE", "") in .../nord/colors/nord.vim @DenniJensen then you will get rid of those annoying carets.

(I was getting them in vim-airline on windows. Indeed, commenting out StatusLineNC was the only fix I could find -- first I tried setting different options.)

@arcticicestudio I don't know how most people handle this, but perhaps you can look @ solarized's colors/solarized.vim and look at StatusLine and StatusLineNC (they do not have them set to same values).


You can find some useful info here: https://stackoverflow.com/questions/7223309/vim-statusline-uses-carret-symbols-for-spaces-how-to-switch-to-spaces

Furthermore, that SO post notes that :help StatusLineNC indicates this problem (but it surely is hidden deep in the help).


cheers,
dylnmc


p.s. I should note, that I do not experience this issue on linux (and I assume that Os X would fair similarly since it is "*nix" -- sort of).

from vim.

dylnmc avatar dylnmc commented on May 18, 2024

Also, can we change the title to Carets in StatusLine if this is the issue so that it is not misleading and people can find this easier from a search engine?

(sorry if I am being picky.)

from vim.

arcticicestudio avatar arcticicestudio commented on May 18, 2024

Thanks @dylnmc for your detailed investigation 👍
The StatusLine and StatusLineNC are actually different, a inactive window has a kind of transparent status line (same background color as all lines) while a active window uses nord1 which is almost the same style like many other color schemes handle it.

Maybe @DenniJensen can try to set the fillchar by adding set fillchars+=stl:\ ,stlnc:\ for the status line to the ~/.vimrc to try to replace the default ^ character with a whitespace.

from vim.

dylnmc avatar dylnmc commented on May 18, 2024

maybe this is for another issue, since this is not related to ctrlp, but...

I left colors/nord.vim alone and opened a split (and then typed :set fillchars+=stl:\ ,stlnc:\ ). Result:

statusnc

I think that if the foreground and background are the same (and the fillchars are the same) (at least on some machines or in some circumstances that I am not quite aware of), then the logic is that you wouldn't know which buffer you're in (if there is a split). So, vim replaces the spaces with carets so that you know which buffer you're in (I didn't really see any documentation on that, but it's what I presume). I wish there were a good way to disable this, but vim seems to force its hand.

The GUI groups are the same. I actually changed to:

call s:hi("StatusLine", s:nord4_gui, s:nord0_gui, s:nord8_term, s:nord1_term, "NONE", "")
call s:hi("StatusLineNC", s:nord4_gui, s:nord8_gui, s:nord8_term, "NONE", "NONE", "")

Which fixes my caret problems.

from vim.

dylnmc avatar dylnmc commented on May 18, 2024

Also, I just tried ctrlp.vim in gvim at work. I was getting this:

statusnc

Changing the the "StatusLineNC" guibg to s:nord8_gui fixed it for me here, too.

from vim.

arcticicestudio avatar arcticicestudio commented on May 18, 2024

The StatusLine and StatusLineNC groups are actually different:

call s:hi("StatusLine", s:nord4_gui, s:nord0_gui, s:nord8_term, s:nord1_term, "NONE", "")
call s:hi("StatusLineNC", s:nord4_gui, s:nord0_gui, s:nord8_term, "NONE", "NONE", "")

As you can see the inactive status line will have no background color (NONE) while the active one is colorized with nord1 (s:nord1_term) which makes it easily recognizable.

An acceptable solution would be to change the foreground of the StatusLineNC group to nord4 while the nord8 foreground color for active status line would still be fine.

I've also tried to reproduce the problem, but even with GVim on Windows 7 (VirtualBox) everything works fine.

gh-37-scrot-window-7-gvim

gh-37-scrot-windows7-gvim

At the moment I am somewhat questioned what exactly causes the problem. If it really depends on a different background color of both status line groups I need to think on how to change these without totally messing up the theme ambiance.

@dylnmc Have you tried to add set fillchars+=stl:\ ,stlnc:\ (note that there is a whitespace at the end!) to your ~/.vimrc instead of setting it manually when Vim is already running?

from vim.

dylnmc avatar dylnmc commented on May 18, 2024

Yes, I did try to set fillchars (with whitespace at end). I think it's because in you set gui colors (not term colors) to same. GUI is set to s:nord4_gui, s:nord0_gui and NONE for guifg, guibg, and guisp (respectively) for both StatusLine and StatusLineNC, are they not?

The term is fine since you set the atts differently. But GUI is same .. I think(?).

ps I'm not using vim in mingw; I'm using gvim (somewhat unfortunately).

from vim.

arcticicestudio avatar arcticicestudio commented on May 18, 2024

I must have been totally thought blocking to not see that this issue is related to the GUI mode only 😵

@skrobul opened PR #46 some days ago which improves the visibility of the status line in GUI mode, but this would also fix this issue.

I've already prepared a change/fix for this issue some time ago and would like to start a poll which solution would fit the best. Both solutions will use nord8 as foreground color for active status lines and nord4 for inactive ones to ensure users can easily see the which window is focused.

Solution 1 - Different background colors for active- and inactive status lines

This solution makes use of contrast difference by using different background colors for active (focused windows)- and inactive (unfocused windows) status lines.

call s:hi("StatusLine", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "")
call s:hi("StatusLineNC", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "NONE", "")

gh-37-scrot-preview-diff_bg

One really small drawback would be that the background color of inactive status lines would collide with the background color for the cursor line (:set cursorline), but this would only be noticeable when the cursor position is right next to the status line.

gh-37-scrot-preview-diff_bg-cursorline

Solution 2 - Uniform background colors for active- and inactive status lines

This solution makes use of the same background color for active (focused windows)- and inactive (unfocused windows) status lines to achieve a uniform style while the nord8 foreground color indicates which window is focused.

call s:hi("StatusLine", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "")
call s:hi("StatusLineNC", s:nord4_gui, s:nord3_gui, "NONE", s:nord3_term, "NONE", "")

gh-37-scrot-preview

It works fine with the cursor line background color (:set cursorline).

gh-37-scrot-preview-cursorline

My personal choice is solution 1 since the small drawback is hardly noticeable and the contrast difference increases the UX by keeping the focus of the user to the active window while fading out currently unused UI elements.

I'd like to hear some opinions which solution would fit the best so this issue can finally be fixed which would include @skrobul propose to improve the status line visibility.

from vim.

dylnmc avatar dylnmc commented on May 18, 2024

I'm voting for option 2 because it's easier to differentiate the cursorline (something I use). I also haven't been using nord as much recently, so don't weight my vote as much as current heavy users. It also seems more consistent (to me) to have the statusline be same color.

Although, in option 1 the window does stand out more..

At least StatusLine and StatusLineNC will be different now and visible! 👍 That's the most important issue—and both solutions look great!

from vim.

skrobul avatar skrobul commented on May 18, 2024

I think my vote goes towards option 1, but it's also somehow skewed because I stopped using cursorline (due to slowness with tmux).
Also, as you said this is noticeable only if your cursor happens to be just next to the status line. In my opinion your eye still can figure out where the cursor line is pretty quickly because it's the only line that is in different color AND empty.

One more thing - if in doubt, why not make it an option?

edit: by option I mean a setting like g:nord_italic_comments

from vim.

arcticicestudio avatar arcticicestudio commented on May 18, 2024

@skrobul Making it configurable sounds like a nice approach to support both styles. We should go with option 1 as default and make option 2 opt-in.

from vim.

dylnmc avatar dylnmc commented on May 18, 2024

I created pull req for new statusline following exactly what you laid out.

Configure with

let g:nord_statusline_uniform = 1

screenshot (left: uniform=1; right: uniform=0 (default)):

screenshot from 2017-09-25 20-42-34

Please note that this may not work exactly as desired in airline or lightline; I'm just trying to get this into develop so that I can use plug 'arcticicestudio/nord-vim', { 'branch': 'develop' }

ps, I am not sure why things can't be merged automagically, but there are a lot of commits to develop (many of which fix issues I have been experiencing—especially in gvim, which I must use for work), so I do hope that these can be merged soon-ish.

Thanks again for everything and hopefully this saved you a couple minutes 😛

pps, I also like the default option best (option 1) 😃

ppps, I think there was a merge conflict with something; I didn't thoroughly review, as I should have, but hopefully, it is merely the readme.

from vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.