Questions tagged [filetype-python]

Configuring and using vi/vim to edit python code. For scripting vim using python, use the /vimscript-python tag.

10 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
610 views

vim compiled with python3 but python3 omni-completion does not work

It used to work when I used python2, but now I can't use ^X^O to complete function names. I do have vim with -python and +python3 (on Ubuntu 16.04), but here is the error I get when trying Ctrl-X ...
3
votes
0answers
482 views

Highlight python raw strings as regular expression

I heard someone had set up their editor to highlight python raw strings as regular expressions, e.g. for Django: urls(r'^site1/(\d)*/new$'', ...) Unfortunately my googleing doesn't get me anything. ...
2
votes
1answer
29 views

Pretty python comments

I comment sections in python via a centered title surrounded by #. What I would like is to make a command so that I can automatically generate such headers. For example, to generate a line like the ...
2
votes
0answers
187 views

How do I setup Mypy with Neomake

I'm trying to use Mypy with Neomake, but without success. I am currently using flake8 with Neomake, and it works seamlessly, e.g.: def foo(bar): return 1 foo(1) > E305 expected 2 blank lines ...
1
vote
0answers
145 views

vim syntax for python call and keyword arguments: issues with built-in keyword

I am trying to come up with a vim syntax for python function call, e.g. foo(notarg==0, arg2, kwarg='a', kwarg2='b') dict(a=1, b=2, c=3) where we want to highlight (i) function name foo, dict (ii) ...
1
vote
0answers
116 views

Issue when creating files using python in vim

When writing or appending files using python inside vim, new files are not being created and existing files are not being changed. Creating and appending files in python script and atom text editor ...
1
vote
0answers
554 views

How to use external python modules with NeoComplete?

After trying out many auto-completion engines for Vim, NeoComplete combined with Jedi seems like a good choice for python development. However, I can't get it to use external libraries like PySide (Qt ...
1
vote
0answers
344 views

Ultisnips not working on first load of python file

I've installed the Ultisnips plugin with Pathogen. All in all it seems to be working fine. My problem is that it doesn't seem to work for the first python file I load, but it works for all the rest. ...
0
votes
0answers
748 views

Correct way to setup python version for coc

I want to set PYTHONPATH and python interpreter according to projects I am working on. I am working both on projects involving python 2.0, and ones involving python 3.0. There is the concept of ...
0
votes
0answers
23 views

Vim Jedi Work for Python2 Functions but Not Python3 Functions

I installed Jedi-Vim with Vim-Plug. I also ran pip3 install jedi and pip install jedi. The plugin works for python2 functions such as raw_input()., however, when I type in input()., vim gives me the ...