LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-05-2008, 04:21 PM   #1
Alt-Ox
LQ Newbie
 
Registered: Nov 2007
Posts: 20

Rep: Reputation: 0
Vim 7.0.235 without syntax hightlighting


Hello guys

I'd like to enable this functionality in my Vim editor, so I've copied the /etc/vim/vimrc file into my home directory (~/.vimrc), however it didn't work.

I have another machine here with the same Vim version installed and with highlighting on.
So, I've copied the file ".vimrc" from this machine to my local machine.

But the vim still doesn's show colored syntaxes!

The current .vimrc file has basically the following:
Quote:
runtime! debian.vim
syntax on
set background=dark
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
(exacty the same uncommented lines from the .vimrc file which is working fine in another machine)

Does anyone know what I'm doing wrongly?
Thanks a lot.
 
Old 04-06-2008, 10:33 AM   #2
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,533

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Perhaps I do... after you source the file in /etc/vim/vim.local file, then add the statement to enable syntax highlighting (and background color). For example:

Code:
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
syntax=on
set background=dark
P.S. I am surprised that you need to source the vimrc.local file; I have two systems (Ubuntu and Fedora) where I do not need to do this. All I have to do is add the features I want to ~/.vimrc to customize my vim experience.

Last edited by dwhitney67; 04-06-2008 at 10:35 AM.
 
Old 04-06-2008, 10:51 PM   #3
Alt-Ox
LQ Newbie
 
Registered: Nov 2007
Posts: 20

Original Poster
Rep: Reputation: 0
Hi man
Tried changing the code as you mentioned above without success.
It's very weird since it works fine with the same code and same version in another machine...

Tried also with anothers users, no success.

Last edited by Alt-Ox; 04-06-2008 at 10:53 PM.
 
Old 04-06-2008, 10:54 PM   #4
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,533

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
What system (i.e. flavor of Linux) is this occurring on? I'll bet a penny that it is either Ubuntu or a sibling of such!
 
Old 04-06-2008, 11:07 PM   #5
Alt-Ox
LQ Newbie
 
Registered: Nov 2007
Posts: 20

Original Poster
Rep: Reputation: 0
It's Debian
Also running Debian (same version) on another machine where Vim works fine.
 
Old 04-06-2008, 11:16 PM   #6
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,533

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Well, maybe it's the same as Ubuntu. With Ubuntu, one must get the "full" version of vim to get syntax highlighting capabilities. Ubuntu ships with a "partial" version of vim.

See if this command works for you:

Code:
$ sudo apt-get install vim-full
If it doesn't, I still bet that this is your problem!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VIM Syntax Highlighting JMJ_coder Programming 3 03-05-2008 04:37 PM
[SOLVED] vim without syntax highlighting lord_didger Debian 5 11-18-2006 01:29 PM
How do I get coloured syntax in ViM? impulse() Linux - Software 2 09-26-2006 09:56 PM
VI Syntax hightlighting chrisk5527 Linux - General 4 01-01-2004 11:19 PM
Vim syntax highlighting NSKL Linux - Software 2 11-09-2002 02:39 AM


All times are GMT -5. The time now is 06:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration