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
Related
I installed the scheme according to the instructions, but the colors are still not as in the documentation.
https://github.com/arcticicestudio/nord-vim
OS - ubuntu 14, connecting via ssh.
Applied, restarted vim.
:PlugInstall
~$ vim ~/.vimrc
Error detected while processing /home/test/.vimrc:
line 17:
E518: Unknown option: termguicolors
Press ENTER or type command to continue
From the error it looks like you don't have that feature compiled on your
version of vim. Although it's not clear to me if you have set termguicolors
in your .vimrc because it was part of the installation instructions or not.
Either way, from :help: termguicolors:
'termguicolors' 'tgc' E954
'termguicolors' 'tgc' boolean (default off)
global
{not available when compiled without the
+termguicolors feature}
You can check if you have the 'termguicolors' feature by doing:
:version
and seeing if the 'termguicolors' has a '+' in front of it (you have it) or a
'-' in front of it (you don't).
Resolved problem.
Indeed, the problem was the lack of termguicolors.
Ubuntu was vim running version 7.4..
termguicolors has been added to vim since version 8. I had to update vim.
Thank you all.
vim --version
sudo add-apt-repository ppa:jonathonf/vim
sudo apt update
sudo apt install vim
vim --version
The error is fairly self-explanatory: you are setting an option that is not available in your Vim.
You have a few ways to get out of this situation…
Not setting the :help 'termguicolors' option at all.
Setting it conditionally:
if exists('+termguicolors')
set termguicolors
endif
See :help exists().
Installing a Vim build that includes the termguicolors feature (and making sure your terminal emulator supports it).
Note that this colorscheme's promised look can only be achieved in:
GUI Vim,
TUI Vim with the termguicolors feature built-in and the termguicolors option set, in a suitable terminal emulator,
in TUI Vim, if you change the colour palette of your terminal emulator.
You should have read the instructions before installing that plugin.
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?
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.
I've installed a fresh Arch Linux system on my laptop and downloaded the vim package.
I haven't altered the .vimrc file, but the syntax highlighting doesn't seem to work with any of the languages I tried (Python, Ruby, CSharp, C...).
Auto formatting (gg, =, G) also fails.
Until now when playing with vim (because I can't really say I've extensively used it) in other OSs (Ubuntu, Fedora), the syntax highlighting came on automatically.
Is there something I am missing here?
You need to have following settings in .vimrc file as per arch linux documentation
filetype plugin on
syntax on
This is the absolute minimum you need to put in your ~/.vimrc if you intend to use vim as your primary editor:
" activates filetype detection
filetype plugin indent on
" activates syntax highlighting among other things
syntax on
" allows you to deal with multiple unsaved
" buffers simultaneously without resorting
" to misusing tabs
set hidden
" just hit backspace without this one and
" see for yourself
set backspace=indent,eol,start
Anything else depends on your taste, workflow and needs.
vi /etc/profile
alias vi=vim
maybe you use vi instead of vim
I had this problem in Opensuse Leap 42.2 cloud. And solved it by installing vim-data
sudo zypper install vim-data
or just re-installing vim will include vim-data automatically.
sudo zypper remove vim
sudo zypper install vim
Type
:syntax on
to get it to work. It is not a default option for vim. Probably in the other systems, it was set to on in the system default vimrc
Or put
syntax on
in ~/.vimrc
Another reason syntax highlighting won't work is you might have a theme/colorscheme set that VIM cannot find.
colorscheme darkblue
Either delete the line or comment it out:
"colorscheme darkblue
I had a similar problem. I could not have syntax highlighting on. I also found that gvim launched without pulldown menus or toolbar icons. It turned out I did not have the vim-runtime package properly installed. In my case I was on debian jessie with a large set of files missing under /usr/share/vim/vim74/ directory.
$ ls /usr/share/vim/vim74/
debian.vim doc/ rgb.txt
The solution was to run:
$ sudo aptitude reinstall vim-runtime
That fixed the problem for me, for syntax highlighting and for missing menus/icons in gvim. I'm not sure why my system was in this state, but the reinstall of the above package solved both issues.
in my case , I changed the term(terminal type) from vt100 to xterm. And it works.
To change the terminal type:
in bash:
export TERM=xterm
in bourne shell or ksh:
TERM=xterm
export TERM
in csh or tcsh:
setenv TERM xterm
On my Ubuntu 18.04 system i.e. c-highlighting works but Icinga2 config file highlighting being provided by the vim-icinga2 package does not. Quote from https://packages.debian.org/sid/vim-icinga2:
As per the Debian vim policy, installed addons are not activated automatically, but the "vim-addon-manager" tool can be used for this purpose.
Executing vim-addon-manager -w install icinga2 following a regular vim-icinga2 package installation solved the issue. The -w option forces a system wide rather than a just per current user activation. Notice that executing vim-addon-manager without arguments yields a list of 39 modes being disabled by default:
> vim-addon-manager
# Name User Status System Status
align removed removed
alternate removed removed
...
icinga2 removed installed # Due to above command
...
If you do miss highlighting chances are your mode is among this list.
NB: Ubuntu 18.04 seemingly inherits Debian's policy. None of the above answers solved my issue. No ~/.vimrc configuration or manual activation was being required after the above described activation.
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.