should redefine functions
This commit is contained in:
parent
02a9dbd2f4
commit
aaf12c552d
@ -3,7 +3,7 @@
|
||||
nnoremap <buffer> <Leader>i :terminal python -i '%'<CR>
|
||||
|
||||
" Lint
|
||||
function Pylint()
|
||||
function! Pylint()
|
||||
silent !pylint --reports=n --output-format=parseable '%' > /tmp/errors.err 2> /dev/null
|
||||
cfile
|
||||
silent !rm /tmp/errors.err
|
||||
@ -14,7 +14,7 @@ endfunction
|
||||
nnoremap <buffer> <Leader>x :call Pylint()<CR>
|
||||
|
||||
" Folding
|
||||
function PythonFold(lnum)
|
||||
function! PythonFold(lnum)
|
||||
if getline(a:lnum-1) =~ '^\s*def\s' || getline(a:lnum-1) =~ '^\s*class\s'
|
||||
return indent(a:lnum-1) / 4 + 1
|
||||
endif
|
||||
@ -30,7 +30,7 @@ function PythonFold(lnum)
|
||||
return '='
|
||||
endfunction
|
||||
|
||||
function PythonFoldText()
|
||||
function! PythonFoldText()
|
||||
return repeat(' ', indent(v:foldstart - 1) + 4) . '+'
|
||||
endfunction
|
||||
|
||||
|
@ -7,7 +7,7 @@ setlocal tabstop=2
|
||||
setlocal shiftwidth=2
|
||||
|
||||
" 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'
|
||||
return indent(a:lnum) / 2 + 1
|
||||
endif
|
||||
@ -20,7 +20,7 @@ function RubyFold(lnum)
|
||||
return '='
|
||||
endfunction
|
||||
|
||||
function RubyFoldText()
|
||||
function! RubyFoldText()
|
||||
return getline(v:foldstart) . ' +'
|
||||
endfunction
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user