LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-04-2009, 02:39 AM   #1
radix_2
LQ Newbie
 
Registered: Dec 2008
Location: Dallas
Distribution: Debian
Posts: 7

Rep: Reputation: 0
vim not indenting and colouring .py files on Debian Lenny/Sid


I have a minimal setup of Lenny/Sid running in a VM. The idea being that I will learn more if I stay on the command line. The minimal install is missing the full version of some programs. Vim is one, but I have already installed vim, vim-runtime, vim-python according to synaptic.

I am learning Python. When opening file.py the editor does not indent properly or highlight syntax. In vim ":syntax enable" does not give full python syntax highlighting.

I followed this walkthrough, but there was no effect. Could it be because I installed Python3.0 from source? My .vimrc file is not created, do I need to point to the plugin files I install in ~/.vim/* ?
 
Old 01-04-2009, 07:31 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Try installing vim-full
 
Old 01-04-2009, 09:52 PM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
OR, vim-common
 
Old 01-05-2009, 09:52 PM   #4
radix_2
LQ Newbie
 
Registered: Dec 2008
Location: Dallas
Distribution: Debian
Posts: 7

Original Poster
Rep: Reputation: 0
followed suggestions

I followed both suggestions. I had vim-common already, but added vim-full and a package that had to do with debugging c. I think.

This didn't solve the problem, so I'm going to delete the ~/.vim/... and .vimrc files and start from scratch. I remember having close to correct highlighting and indentation from scratch at one time.

Any hints will be appreciated, but I'll get it eventually.
 
Old 01-08-2009, 10:23 PM   #5
radix_2
LQ Newbie
 
Registered: Dec 2008
Location: Dallas
Distribution: Debian
Posts: 7

Original Poster
Rep: Reputation: 0
After looking at it for a bit, I think it probably has to do with my environment. I have an eight-bit color terminal I am using, no x-windows, so maybe if I fix that.

I copied a plugin from the vim website to ~/.vim/syntax/python.vim shouldn't I expect vim to recognize *.py files (there is a line linking the script to *.py) and implying 'syntax enable'? Because I have to 'syntax on' to get highlighting.

Still irked.
 
Old 01-09-2009, 01:19 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Add 'syntax enable' to your .vimrc in your home dir.
 
Old 10-21-2009, 06:57 PM   #7
debsys07
Member
 
Registered: Mar 2007
Posts: 46

Rep: Reputation: 16
PRism01,

I know this is replying to an old post, but it just helped me get vi/vim going again w/syntax recognition like it used to. Who would've thought "syntax on" & "syntax enable" do different things??

Thanks again,
Ron
 
Old 10-21-2009, 08:49 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Great! Feel free to click the BlueThumb.
 
  


Reply



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
Need password recovery help! debian lenny/sid azadehfarshidi Linux - Newbie 2 02-10-2009 02:28 AM
LXer: Installing Debian lenny/sid on Fujitsu Lifebook P7230 LXer Syndicated Linux News 0 11-24-2007 09:20 AM
vim auto indenting? kryptobs2000 Linux - Software 2 10-20-2007 03:11 PM
Various problems with xorg 7.2 under debian (Lenny/Sid) with i810 driver. adz Debian 5 07-22-2007 07:55 AM
disable indenting in VIM Ygrex Linux - Software 3 12-24-2005 04:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:14 AM.

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
Open Source Consulting | Domain Registration