vim not indenting and colouring .py files on Debian Lenny/Sid
Linux - SoftwareThis 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
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.
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/* ?
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.
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.
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??
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.