should redefine functions
This commit is contained in:
parent
02a9dbd2f4
commit
aaf12c552d
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user