From aaf12c552d3d0d20675281606503d4da01bf2f24 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Tue, 29 Dec 2015 21:46:22 +0100 Subject: [PATCH] should redefine functions --- config/nvim/ftplugin/python.vim | 6 +++--- config/nvim/ftplugin/ruby.vim | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/nvim/ftplugin/python.vim b/config/nvim/ftplugin/python.vim index 7ab2d64..282ff5f 100644 --- a/config/nvim/ftplugin/python.vim +++ b/config/nvim/ftplugin/python.vim @@ -3,7 +3,7 @@ nnoremap i :terminal python -i '%' " 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 x :call Pylint() " 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 diff --git a/config/nvim/ftplugin/ruby.vim b/config/nvim/ftplugin/ruby.vim index 7abf672..060f743 100644 --- a/config/nvim/ftplugin/ruby.vim +++ b/config/nvim/ftplugin/ruby.vim @@ -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