How do I get python.vim to work with vim?

I play with vim and I heard that python.vim has some excellent settings for python.

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

Q1: How to integrate python.vim with vim? Q2: Since I am not familiar with vim, if I use something like python.vim, will it have a crazy effect on files other than python, or will the parameters only apply to python files?


Update:

I already put the file in the appropriate directory, as indicated in the link that I posted. It does not seem to work with vim. Should I fix it somehow from vim? From the outside of vim? I feel like I have tried both, and the other is not working.

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

FYI - I do this on a MAC.

+3
source share
2 answers

Q1:

Follow the installation instructions in the description of the python.vim files

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

2:

python.vim is a file type plugin, so it will only work when editing .py files.

Regarding your update:

Try the command:

:syntax on

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

In addition to this, you may need to add this also to your .vimrc:

filetype plugin on
+4
source

install details

Put the python.vim file in ~ / .vim / syntax / folder.

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

And this only applies to .py files.

0
source

Source: https://habr.com/ru/post/1756497/


All Articles