1
0
mirror of https://github.com/tiyn/wiki.git synced 2025-10-21 23:21:16 +02:00

python: added installation and vim support

This commit is contained in:
TiynGER
2020-12-09 00:52:18 +01:00
parent 50622a631f
commit c7c6b2442f
2 changed files with 64 additions and 0 deletions

24
wiki/linux/vim/python.md Normal file
View File

@@ -0,0 +1,24 @@
# Python
Python is a common programming language.
In this entry we will focus on making vim support python and use vim as an ide
for it.
## Autocompletion
### Coc
To enable autocompletion for [coc](coc.md) you need to install the coc-package
`coc-python`. Do that by adding it to the extension section of your `init.vim`.
## Formatting
Install `autopep8` to your system.
Then add `autocmd FileType python setlocal formatprg=autopep8\ -` and
`autocmd FileType python noremap <F8> gggqG` to your
`init.vim` to reformat on F8.
## Line length
To set your python buffers to show column 80 add
`autocmd BufEnter,FileType python set colorcolumn=80` to your `init.vim`.