Vim using wrong colors
I have a problem with my vim and terminal configurations.
I am on Fedora Linux 27, run i3 and the gnome-terminal. I want to use the srcery
color scheme (GH page). On GVim it works perfectly, right out the box. However, on the terminal it doesn't look as good. Srcery isn't the only color scheme with this issue, virtually all Base16 color schemes and all others that use 256 colors suffer from the same problem.
What I find bizarre, is that my $TERM
variable is set to xterm-256color
, tput colors
gives out 256, and even vim itself claims to have a t_Co
set to 256. I can do things like make the background of vim transparent, which then works properly.
you can see the color scheme working properly in GVim
a comparison to normal vim.
I have my gnome-terminal
colors set to the srcery colors as well, there's a script on the GH page to create a srcery
profile, which i am using. Alas, that does not help with my issue either.
Currently, I don't know how i could enable vim to correctly display my color scheme
Any help you could provide would be greatly, greatly appreciated.
See also questions close to this topic
-
VIM: Backspace deletes in normal mode, but does nothing in insert mode.
Preliminary Info:
- Issue is in terminal Vim, not gVim
- I used CMDER (based on conemu) as my terminal emulator
- I am on Windows 10
Detailed Description:
When I'm in Insert mode, I can type text as normal, but backspace does nothing. While in normal mode, the backspace key deletes text. This is exactly opposite the behavior I had just earlier today. I have read numerous other posts online describing Vim's unorthodox backspace behavior, but the suggested config settings (namely bs=2 or bs=indent,eol,start) had done nothing.
More unusual is that gVim behaves "normally" that is: Backspace move the cursor to the left in normal mode, and deletes text in insert mode.
What I would like is for backspace to delete text in insert mode (just like most other programs) and to be navigation/disabled in normal mode. How can I regain this behavior?
Below is a copy of my _vimrc: (I would put this on github but my git is messed up at the moment and I've yet to fix it.) Additionally there was a function that was inside of the _vimrc by default. I have no idea what it does but omitted it to save space. If you want to see if I can post it in a reply.
source $VIMRUNTIME/vimrc_example.vim source $VIMRUNTIME/mswin.vim behave mswin " Pathogen - Plugin manager execute pathogen#infect() set nocompatible " Turns off Vi compatability gubbinz " Color Theme if !has("gui_running") " Allows some 256 color themes to work in Terminal set term=xterm set t_Co=256 let &t_AB="\e[48;5;%dm" let &t_AF="\e[38;5;%dm" colorscheme gruvbox endif let g:gruvbox_dark_contrast = 'hard' " Both of these are just visual gruvbox tweaks let g:gruvbox_light_contrast = 'hard' set guifont=Consolas:h10:cANSI:qDRAFT " Changes font set bs=indent,eol,start " Makes backspace be normal set filetype=ON " Has vim check for filetype set showcmd " Displays incomplete commands set ruler " Shows position of cursor in document set syntax=ON " Turns on syntax highlighting set number " Show line numbers set linebreak " Break lines at word (requires Wrap lines) set showbreak=+++ " Wrap-broken line prefix set textwidth=100 " Line wrap (number of cols) set showmatch " Highlight matching brace set hlsearch " Highlight all search results set smartcase " Enable smart-case search set incsearch " Searches for strings incrementally set autoindent " Auto-indent new lines set shiftwidth=4 " Number of auto-indent spaces set smartindent " Enable smart-indent set smarttab " Enable smart-tabs set softtabstop=4 " Number of spaces per Tab set undolevels=1000 " Number of undo levels set backspace=indent,eol,start " Backspace behaviour set go=egrLTm " Changes flags that specify how the GUI loads
- Linux terminal type brackets and many zeros automatically follow
-
How to autocomplete in vim based off partial matching via ctags
Example:
In a file in another directory I have a function defined by the following:
def _generator_function_1(self): passs
In the file of my current directory, I have typed the following:
def test_generI
where
I
denotes my cursor position.I would like to use vim's autocompletion functionality (i.e. via
^n
or^p
) to autocomplete the function definition totest_generator_function_1
. Is there a way of configuring vim autocompletion to match not based off full-prefixes? Or, is there a way in ctags to generate tags based off keywords instead of full function definitions?EDIT: To clarify, I am specifically wondering if keyword-based autocompletion exists. I have autocompletion by tags setting up, so if I typed
"_gen"
, then^n
would complete to give me"_generator_function_1"
. In my example, however, it is because the string is prefixed by"test"
that"test_gener"
as the starting typed word does not lead to any autocomplete suggestions. So I am wondering if this can somehow be made possible. -
if display=block change it to none with javascript
for this code
#element1{display=block} <div id="element1"></div>
how can I write javascript code like
otherbutton on click if(element1display=block){ change it to display=none }
-
Customize Title bar qml
How can I change color background on this title bar in qml, change icon, change buttons on this bar?
-
Plotting many graphs with different and distinguishable colors
I have this plotting loop and I want to assign different colors to that. Now it considers only the colors that it wants. So, when
N
increases, the colors of some of the graphs are the same. So distinguishing between them is really hard. How can I dedicate different colors to the different graphs?N=24
and is the number of the graphs.for i=1:N plot(time(1:350),STDX(1:350,i),'lineWidth',3) hold on end
-
Change default color space of Xcode 9
I'm aware that there is already a quite similar question to this, however I could not find any answer. I like using the Color LCD color space because it's more saturated, unfortunately I would have to select it for every color I'm using because I can't find a possibility to set is as default color space.
Any suggestions on how to do it?
- How to change the preselected item's color from list in "Open resource"
-
UI Design Questionnaire
I'm doing a research project on POS UI development. Therefore, I'm doing a survey to gather some information regarding that area. Please be kind enough to support me by filling this small questionnaire.
Thank you
-
Add font to Gnome Terminal?
In a recent package update for Gnome Terminal, Noto fonts disappeared from font choices listed in Settings. I have looked, but found no answer. Noto Sans Mono Regular, and all other Monos associated w/ Noto, are listed as Mono within every file I can find on my computer.
How can I get Gnome Terminal to list Noto's Mono fonts in terminal, again?
-
Perform command in new Terminal (Ubuntu 17.10)
I am partly confused and am quite sure I suck at googling, b/c this should be quite a common issue, but I only found solutions way above that I am looking for, not for the base case.
Here's the problem: Inside a terminal/script, I want to start another terminal where a program/command is run. When I try
gnome-terminal -e ls
orgnome-terminal --command=ls
It tells me that these commands are depreciated, but I do not know what else to use. In the end, I want to use this for a script like this, where I can put a gnome-terminal before each command so I get the result in different windows
#!/bin/dash ~/ngrok/ngrok http 8080 sudo ~/MailCatcher/MailHog_linux_amd64 -smtp-bind-addr 0.0.0.0:25
Just running
gnome-terminal ls
leads to the opening of a new terminal, but the ls command is not exectued -
Terminal is not running any command after using command "cat > .bashrc"
I was customizing my terminal by screenfetch. after installing screenfetch in my ubuntu, I have used some command
cat > .bashrc # Start Screenfetch screenfetch
then I pressed ctrl + d and close the terminal. When I reopen the terminal ,my terminal was showing empty terminal:
now the terminal is not running any command and showing nothing in it.