views:

98

answers:

2

I am playing around with vim and I heard that python.vim has some nifty settings for python.

Link to python.vim http://www.vim.org/scripts/script.php?script_id=790

Q1: How do I integrate python.vim with vim? Q2: Because I am not familiar with vim, if I use something like python.vim will it have a crazy effect on non-python files or will the settings just apply to python files?


Update:

I already places the file in the appropriate directory as instructed by the link I posted. It doesn't appear to be working with vim. Do I have to source it some how from vim? From outside of vim? I feel like I have tried both and neither are working.

Also the directory the ~/.vim/syntax/ folder did not exist. I had to create it.

FYI - I'm doing this on a MAC.

+3  A: 

Q1:

Follow the installation details in the python.vim files description

"install details Place python.vim file in ~/.vim/syntax/ folder."

Q2:

python.vim is a filetype plugin so it will only work when you are editing .py files.

Regarding your update:

Try issuing the command:

:syntax on

This will turn on syntax highlighting. If you want this to always be on you can add it to ~/.vimrc

In addition to this you may need to add this to your .vimrc as well:

filetype plugin on
GWW
A: 

install details

Place python.vim file in ~/.vim/syntax/ folder.

Quoted from http://www.vim.org/scripts/script.php?script_id=790

And it only applies to .py files.

Amber
I got that far. :-) It doesn't appear to be working with vim. Do I have to source it some how from vim? From outside of vim? I feel like I have tried both and neither are working.
jakopanda