1
0
mirror of https://github.com/gryf/.vim.git synced 2025-12-17 11:30:29 +01:00

Substituted pylint compiled with new one.

Added Pep8 command
clean up in vimrc and ftplugin/python/common
This commit is contained in:
2010-09-12 20:05:35 +02:00
parent 2b81844ae6
commit 73d7af783c
6 changed files with 419 additions and 189 deletions

View File

@@ -1,28 +1,61 @@
set cinkeys-=0#
set expandtab
set foldlevel=100
set foldmethod=indent
set indentkeys-=0#
set list
set noautoindent
set shiftwidth=4
set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class,with
set smarttab
set softtabstop=4
set tabstop=4
set textwidth=78
set colorcolumn=+1
setlocal cinkeys-=0#
setlocal indentkeys-=0#
setlocal expandtab
setlocal foldlevel=100
setlocal foldmethod=indent
setlocal list
setlocal noautoindent
setlocal shiftwidth=4
setlocal smartindent
setlocal cinwords=if,elif,else,for,while,try,except,finally,def,class,with
setlocal smarttab
setlocal softtabstop=4
setlocal tabstop=4
setlocal textwidth=78
setlocal colorcolumn=+1
inoremap # X<BS>#
set wildignore+=*.pyc
"inoremap # X<BS>#
"set ofu=syntaxcomplete#Complete
let g:pylint_onwrite = 0 " I don't want to run pylint on every save
compiler pylint
"autocmd FileType python setlocal omnifunc=pysmell#Complete
let python_highlight_all=1
"Load views for py files
autocmd BufWinLeave *.py mkview
autocmd BufWinEnter *.py silent loadview
compiler pylint
finish "end here. all below is just for the record.
" Pylint function, which can be optionally mapped to some keys. Currently
" not used.
if !exists('*<SID>runPyLint')
function <SID>runPyLint()
echohl Statement
echo "Running pylint (ctrl-c to cancel) ..."
echohl Normal
:Pylint
endfunction
endif
if !exists('*<SID>PyLintBuf')
function <SID>PyLintBuf()
echohl Statement
echo "Running pylint (ctrl-c to cancel) ..."
echohl Normal
let file = expand('%:p')
let cmd = 'pylint --reports=n --output-format=text "' . file . '"'
if has('win32') || has('win64')
let cmd = 'cmd /c "' . cmd . '"'
endif
exec "bel silent new " . file . ".lint"
exec "silent! read! " . cmd
endfunction
endif