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
622 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
206 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 ...
3
votes
0answers
486 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. ...
1
vote
0answers
152 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
118 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
345 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
1answer
40 views

How can I configure Black the python code formatter to indent 2 spaces instead of 4?

I'm using the psf/black plugin, I install and load it with vimplug: Plug 'psf/black' and I use it with <leader>f: autocmd FileType python nmap <leader>f :Black<CR> I use and prefer ...
0
votes
0answers
847 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 ...