Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm now using KDE 3.1 on Arch .5. Everything is bleeding edge stable up-to-date
In any case, I use konsole for my colsoles (transparency is awesome......) but I'm having a problem with vim (my editor of choice).
When I'm in a normal console window (TTY1 for instance), vim correctly displays the colors for different types of files. This is of course very helpful. In Konsole however, the colors are not displayed. All of the text is white!
Also, the colors in my prompt (username, time, etc.) DO display correctly in Konsole, so it isn't just a single konsole setting. Any ideas where it might be? Thanks!
Another thought: Does Konsole set the $TERM variable correctly, and if so - to what? It might set the terminal type to something that vim doesn't recognize, and if it doesn't recognize the $TERM it will default to black and white.
You could try something like TERM=xterm vim to launch your editor with the terminal type set to plain xterm (which vim recognizes as a color-capable terminal).
Hello Everyone
Here is what I have in the ~/.vimrc file:
Code:
"
" Colo(u)red or not colo(u)red
" If you want color you should set this to true
"
let color = "true"
"
if has("syntax")
if color == "true"
" This will switch colors ON
so ${VIMRUNTIME}/syntax/syntax.vim
else
" this switches colors OFF
syntax off
set t_Co=0
filetype on
endif
endif
On my machine VIMRUNTIME contains /usr/share/vim/current
Here is the /usr/share/vim/current/syntax/syntax.vim file:
Quote:
" Vim syntax support file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2001 Sep 04
" This file is used for ":syntax on".
" It installs the autocommands and starts highlighting for all buffers.
if !has("syntax")
finish
endif
" If Syntax highlighting appears to be on already, turn it off first, so that
" any leftovers are cleared.
if exists("syntax_on") || exists("syntax_manual")
so <sfile>:p:h/nosyntax.vim
endif
" Load the Syntax autocommands and set the default methods for highlighting.
runtime syntax/synload.vim
" Load the FileType autocommands if not done yet.
if exists("did_load_filetypes")
let s:did_ft = 1
else
filetype on
let s:did_ft = 0
endif
" Set up the connection between FileType and Syntax autocommands.
" This makes the syntax automatically set when the file type is detected.
augroup syntaxset
au! FileType * exe "set syntax=" . expand("<amatch>")
augroup END
" Execute the syntax autocommands for the each buffer.
" If the filetype wasn't detected yet, do that now.
" Always do the syntaxset autocommands, for buffers where the 'filetype'
" already was set manually (e.g., help buffers).
doautoall syntaxset FileType
if !s:did_ft
doautoall filetypedetect BufRead
endif
I don't know if this can work for you, but I have colors in Konsole and TERM=xterm with this vim configuration file.
Hi, thank you very much, unfornutely is not working for me, I have TERM=xterm in Konsole and have tried with all the color schemes it offers (from Black on Light Color, to VIM colors to XTERM Colors).
Only using gvim I can get "colorscheme someColorScheme" working.
Any idea on how to override the colors imposed by Konsole? I'm used to it and wouldn't want to install another terminal before getting Konsole right.
By the way, I needed to log to MSN with Kopete and upgraded KDE with "yum update kdenetwork" , it downloaded all the dependencies (including kdebase), could I have missed something there that is affecting VIM colors?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.