Closed guest73 closed 5 months ago
Basically, the vertical line at the right becomes blue, selection becomes blue but most annoyingly, some numbers become black making them unreadable :(
nnn
shouldn't be doing anything like that. It's most likely something in your .bashrc
or .vimrc
or similar.
Try to see if you can reproduce in a clean environment without any .bashrc
or .vimrc
etc.
nnn
shouldn't be doing anything like that. It's most likely something in your.bashrc
or.vimrc
or similar.Try to see if you can reproduce in a clean environment without any
.bashrc
or.vimrc
etc.
But nevertheless it does something.
Tried on stock .bashrc, minimal vim config where loaded just 1 plugin
Plug 'tinted-theming/base16-vim
let base16_colorspace=256
let base16_background_transparent=1
colorscheme base16-default-dark
and then
source .config/bash-config/colors.sh
- which is the script posted in original message
Run nnn, do the steps and it happens again.
I am not an expert on bash, but I guess nnn does something weird with sub-shelling when calling Vim with e
key.
I can run vim a couple of times, do some editing, run MidnightCommander, trigger vim from it, do more editing, quit MC, do editing again, and no problem whatsoever. Also when I run nnn and simply do the navigation and then quit it also works ok. But once I press e
and start vim and quit it, next time I run vim its colors are screwed.
It might be something related to xfce-terminal I use, but I doubt it.
source .config/bash-config/colors.sh
Are you putting this in your bashrc?
source .config/bash-config/colors.sh
Are you putting this in your bashrc?
It does not matter. I can put it in .bashrc or source it in the shell, the result is the same.
I guess nnn does something weird with sub-shelling when calling Vim with e key.
nnn doesn't spawn any sub-shells. It executes $EDITOR
directly.
Plug 'tinted-theming/base16-vim
It seems like this colorscheme executes some shell script: https://github.com/tinted-theming/base16-vim/blob/17b238f0c173b4c174523690bb41cdab952ee27b/colors/base16-default-dark.vim#L12-L16
I suspect this is what's causing the issue. If you cannot reproduce it with vim --clean
then the problem is likely not in nnn.
Ok. I figured. What helped was setting
set termguicolors
inside .vimrc. This is mentioned inhere Troubleshooting
Also
It seems like this colorscheme executes some shell script: https://github.com/tinted-theming/base16-vim/blob/17b238f0c173b4c174523690bb41cdab952ee27b/colors/base16-default-dark.vim#L12-L16
is not true. None of the docs for either TintedTheming Vim or Base16-vim
was actually saying I must set this variable let g:base16_shell_path
, so I did not. And without this variable nothing was actually executed. But I guess it must be set in order to work in login shells or something.
Nevertheless, @N-R-K thanks for pointing me in the right direction.
Seems like indeed not nnn
's problem.
Environment details (Put
x
in the checkbox along with the information)nnn
masterExact steps to reproduce the issue
e
to edit any text filee
again to edit the file. Now some colors are messedOn each bash open I source this file to change shell colors
Even if I close nnn the colors remain messed until I source the above file again. What nnn could potentially do to cause this behaveor?