[Tutor] Enable Python feature in vim editor

Alan Gauld learn2program at gmail.com
Mon Nov 22 14:12:55 EST 2021


On 22/11/2021 16:48, Kaushal Shriyan wrote:
> I am using vim editor to write python scripts. Is there a way to enable
> syntax, help and indentation of python script?

vim can do most things but you need to configure it.

Out of the box it should do syntax highlighting and content aware
indentation
when editing a .py script.

You can modify the colour scheme etc. too

You can also turn on various  advanced features. There are several YouTube
videos showing you how. Just search for "vim and Python"

If, OYOH you want to trurn on Python mode for writing vim macros then
you need a build of vim with Python included in the build. If you have
that you can enable python macros using an option, google is your friend!

If that doesn't get you the answer come back here, several of us, including
me, use vim as our primary editor for python.  The problem is I've been
doing so for ages and can't recall all the options I've turned on/off
over the years! But I'm happy to hunt for anything specific you need.

I might even learn some new tricks myself! :-)

-- 

Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



More information about the Tutor mailing list