I've been looking everywhere for an answer to this, nothing so far.
I installed vim, got the colorschemes, got a bunch of plugins (including guicolorscheme.vim), followed the steps on the wiki and the terminal does not display a single color.
When I turn :syntax on, I get things like this:
^[[38;5;130mset ^[[38;5;5mt_Co=256
^[[38;5;130mset ^[[38;5;5mt_AB=^[[48;5;%dm
^[[38;5;130mset ^[[38;5;5mt_AF=^[[38;5;%dm
Formerly:
set t_Co=256
set t_AB=^[[48;5;%dm
set t_AF=^[[38;5;%dm
Any ideas? I tried both in a normal gnome-terminal and guake, with the same results: plain monochromatic text. Not even a trace of the colorscheme either.
Thanks in advance.
EDIT:
Seems I messed up with the config files (that or a broken install). I reinstalled, and just with guicolorscheme and set to 256 on the vimrc seems to be working just fine.
Related
I like the syntax highlighting that comes enabled with vim on Red Hat EL7. I'd like to know what colorscheme it's using but when I type :colorscheme it says 'default'.
I'd like to replicate this colorscheme on MacOS and perhaps elsewhere but I'm not sure where to start.
All built-in colorschemes should be available in the colors directory of vim runtime. You can get to the directory using:
:e $VIMRUNTIME/colors
However, the default colorscheme uses this syntax file:
:e $VIMRUNTIME/syntax/syncolor.vim
You can use this vimcast as a reference for building your colorscheme: http://vimcasts.org/episodes/creating-colorschemes-for-vim/
P.S: I haven't used Red Hat EL7 before, could you please share a screenshot of how the colorscheme looks like?
When I open a file, eg vim .bashrc, vim opens the file and change the first letter to g. What I see is the following:
g To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
...
I change g back to #, but after loading the file its again changed. Happens with multiple files.
Last things I have done was: installig gcc and make.
Why is this happening?
EDIT:
My .vimrc file:
set nocompatible
set backspace=indent,eol,start
set number
set tabstop=4
syntax on
I had the exact same problem
I found out it was a bug in my ssh client (mobaXterm).
Updating (to mobaXterm 'personal edition v9.1') resolved the issue.
I am using vim on Ubuntu Linux 16.04 via MobaXterm version 7.7. This is an older version of MobaXterm that supports command-line-settable terminal background colors.
The following change to my .bash_profile solved this problem for me:
# Fix for Vim 8.0 bug that stomps on line 1 char 1:
export TERM=linux
Strange enough, but it works for me. I created a ~/.vimrc file:
syntax on
set background=dark
The 2nd option disable the bug.
So it appers to be a vim issue. So far I gathered only two solutions:
Reinstall to older version of vim. i reinstalled to 7.4.752-1 and bug is gone.
Change cygwin terminal to anyone but "xterm*" (right-click on title bar -> Options... -> Terminal -> Type)
For me, I traced the issue down to the following line:
set nocompatible
It is found in /usr/share/vim/vim74/debian.vim, which is included from /etc/vim/vimrc with the line runtime! debian.vim
make sure you dont set the visual bell in your .vimrc
set visualbell
in case you have it then just delete it :)
The exact same thing was happening to me! It wasn't occurring in gvim, so I thought maybe something was going on in my .vimrc. I zeroed-out my .vimrc but it was still happening. Only when I completely deleted my .vimrc did this behavior stop. As suggested,I rolled back to an older version (7.3.1152-1) with cygwin setup and that fixed it. I did not have to change any terminal settings, however. It makes sense because I updated cygwin yesterday, when I started seeing the errant g's.
I am on ArchLinux. vim 8.0.0987-1 always decreases a number upon opening a file (as if xtrl+x pressed). Downgrade to 8.0.0722-1 fixed the issue.
I installed it with Vundle and my .vimrc look contains the following
" Powerline setup
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 9
set laststatus=2
I am using the default Gnome Terminal than comes with Ubuntu 14.04. I don't know if it installed correctly (I followed this Vim as Python IDE tutorial) but it does not look anything like the screenshots.
Here is what is it meant to look like: Official Screenshots
And here is what it actually looks like:
As you can see, zero similarity.
The 'guifont' option applies only to GVIM. In the terminal, Vim uses the default terminal font. So, you need to go to Gnome Terminal's settings (Edit > Profile Preferences > /General\ > Font:) and change the font there, too (assuming Powerline supports the terminal at all, which I don't know).
Also, check how many colors Vim detects via :set t_Co?; you can influence / correct that by defining the correct $TERM value, probably gnome-256color for your.
Have you installed the patched fonts?
https://github.com/powerline/fonts
Ok so I'm setting up MacVim on my new macbook with Yosemite, using a homebrew installation.
To start off with I have no ~/.vimrc or ~/.gvimrc files setup at all.
Also I'm already familiar with links on stackoverflow which have explained that the .gvimrc file settings are usually applied after the .vimrc settings
When I execute the following command directly in MacVim my color scheme is applied fine
:colorscheme twilight
However, when I add the following line to a newly created ~/.gvimrc file the colour scheme does not load when I restart MacVim
colorscheme twilight
Keep in mind that I have nothing else apart from this line in my .gvimrc file and I have not setup a .vimrc file. If I execute the following command in MacVim
:scriptnames
I get the following output (not all lines included for clarity):
1: /usr/local/Cellar/macvim/7.4-73_1/MacVim.app/Contents/Resources/vim/vimrc
...
14: /usr/local/Cellar/macvim/7.4-73_1/MacVim.app/Contents/Resources/vim/gvimrc
...
20: ~/.gvimrc
You will noticed that MacVim thinks it has loaded the .gvimrc file. Anyone got any ideas why the color scheme won't load?
Ok so it looks like I've figured out what the problem is. The gvimrc and vimrc files were setup fine in the end, the problem is to do with what command you're supposed to execute to run MacVim
I came across the following link:
https://code.google.com/p/macvim/issues/detail?id=138
It was post #6 which made me realise that I was possibly running MacVim in the wrong way. I'm figuring that initially I probably mistakenly ran the MacVim binary directly which according to that post is the incorrect way to do it. Of course because I was running MacVim from spotlight it was repeatedly rerunning the incorrect command.
Anyway, I ran the command Vim -g from the command line instead and it worked fine.
Configured vim and gvim on Windows, as well as vim and macvim on OSX. Intend to learn rails 3, so installed rails 3 rc on both OS'ses. So far, so good.
When using macvim, each and every script execution offered by rails.vim gives me errors "Uninitialized constant Bundler (NameError)". Tried :Rserver, :Rgenerate, .... However, staying on OSX, when firing up vim from a terminal window, rails.vim runs just fine, as well as execution of the rails script from the terminal directly.
So somewhere, somehow my macvim configuration seems to mess things up. However, unless I'm mistaken, it simply uses the settings from the .vimrc and .gvimrc files. Now, the .gvimrc is really minimalistic, so I might just as well add it here:
set guifont=Inconsolata:h17 " Font family and font size.
set antialias " MacVim: smooth fonts.
set encoding=utf-8 " Use UTF-8 everywhere.
set guioptions-=T " Hide toolbar.
" set background=light " Background.
set lines=40 columns=100 " Window dimensions.
set guioptions-=r " Don't show right scrollbar
Any suggestion on how to solve this would be appreciated.
Your $PATH may not be set correctly in MacVim, or perhaps something else is missing from your environment?
Try starting a shell from MacVim using :shell and run the ruby commands manually to see if you get the same error. You could also try comparing environment variables between MacVim and Terminal vim using :new | read !env in each.
Version 7.3 of Vim was released yesterday. Checked, and a new version of MacVim was already built, based on this latest Vim release. Downloaded and tested, and rails.vim scripts work the way they are supposed to now! So issue solved.