should redefine functions

This commit is contained in:
Felix Van der Jeugt 2015-12-29 21:46:22 +01:00
parent 02a9dbd2f4
commit aaf12c552d
2 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@
nnoremap <buffer> <Leader>i :terminal python -i '%'<CR> nnoremap <buffer> <Leader>i :terminal python -i '%'<CR>
" Lint " Lint
function Pylint() function! Pylint()
silent !pylint --reports=n --output-format=parseable '%' > /tmp/errors.err 2> /dev/null silent !pylint --reports=n --output-format=parseable '%' > /tmp/errors.err 2> /dev/null
cfile cfile
silent !rm /tmp/errors.err silent !rm /tmp/errors.err
@ -14,7 +14,7 @@ endfunction
nnoremap <buffer> <Leader>x :call Pylint()<CR> nnoremap <buffer> <Leader>x :call Pylint()<CR>
" Folding " Folding
function PythonFold(lnum) function! PythonFold(lnum)
if getline(a:lnum-1) =~ '^\s*def\s' || getline(a:lnum-1) =~ '^\s*class\s' if getline(a:lnum-1) =~ '^\s*def\s' || getline(a:lnum-1) =~ '^\s*class\s'
return indent(a:lnum-1) / 4 + 1 return indent(a:lnum-1) / 4 + 1
endif endif
@ -30,7 +30,7 @@ function PythonFold(lnum)
return '=' return '='
endfunction endfunction
function PythonFoldText() function! PythonFoldText()
return repeat(' ', indent(v:foldstart - 1) + 4) . '+' return repeat(' ', indent(v:foldstart - 1) + 4) . '+'
endfunction endfunction

View File

@ -7,7 +7,7 @@ setlocal tabstop=2
setlocal shiftwidth=2 setlocal shiftwidth=2
" Folding " Folding
function RubyFold(lnum) function! RubyFold(lnum)
if getline(a:lnum) =~ '^\s*def\s' || getline(a:lnum) =~ '^\s*class\s' || getline(a:lnum) =~ '^\s*module\s' if getline(a:lnum) =~ '^\s*def\s' || getline(a:lnum) =~ '^\s*class\s' || getline(a:lnum) =~ '^\s*module\s'
return indent(a:lnum) / 2 + 1 return indent(a:lnum) / 2 + 1
endif endif
@ -20,7 +20,7 @@ function RubyFold(lnum)
return '=' return '='
endfunction endfunction
function RubyFoldText() function! RubyFoldText()
return getline(v:foldstart) . ' +' return getline(v:foldstart) . ' +'
endfunction endfunction