JoseBlanca / vim-for-python

vim scripts and configuration to ease the python programming using vim

Home Page:vimforpython

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aim

This project tries to convert vim in a python IDE adding some scripts and configurations.

Features

  1. It uses 4 spaces instead of tabs
  2. It shows the line numbers in a column
  3. It shows the matches when performing a search and when the search is done
  4. It indents the python code
  5. It removes the trailing spaces every time the file is closed
  6. It shows the pylint line suggestions, using it as a compiler
  7. It highligts the characters above the column 80
  8. It allows commenting and uncommenting for different file types.
  9. It supports code folding
  10. It completes code

Pylint integration

pylint is used as the compiler for the python files. The lines with problem will be showed in the quickfix window and as signs at the corresponding lines. The error list is updated everytime the file is saved. The compiler used is a modified version from the original pylint vim compiler created by Oleksandr Tymoshenko.

This pylint vim compiler takes the errors, warnings and comments made by pylint and it adds them to the vim quickfix list and to the signs. The quickfix appears in a window on the bottom of the screen with the type of error, its number, its description and the line number. The signs appear in a column with a mark close to each line with problems: "EE" for errors, "WW" for warnings and "CC" for comments.

Every time the buffer is written to disc pylint is run and the problem lists is updated.

Mappings

key mapping Action
<crtl-D> wild menu
<F3> Comments a line or block
<F4> Uncomments a line or block
<ctrl-X><crtl-O> Code complete (inttelli sense)
<ctrl-n> Code complete (looking at the words in the buffer
<C-space> Same as <crl-X><crtl-O> (code complete)
v visual select mode
V visual select mode for lines
<ctrl-v> visual select mode for blocks of text
< In visual mode shift block to left
> In visual mode shift block to right
<space> Toogle folding
:bd close buffer
<ctrl-w> q close current buffer/window
:qa quit
:new. open a new buffer navigating
:e file open a new buffer (use it with wild menu)
/ search
search the word under the cursor forward
# search the word under the cursor backwards
:set paste to paste code
:set nopaste to go back to normal mode
: set wrap wrap long lines
: set nowrap don't wrap long lines
: set spell show spelling mistakes

Related reading

Pluggins used

About

vim scripts and configuration to ease the python programming using vim

vimforpython


Languages

Language:Vim Script 100.0%