From: Sergey Matveev Date: Fri, 12 Nov 2021 11:44:49 +0000 (+0300) Subject: python#importcompl#all() helper X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=419be3d1d8833aa1d83a958c444fbe69a84a7f59 python#importcompl#all() helper --- diff --git a/vim/.vim/autoload/python/importcompl.vim b/vim/.vim/autoload/python/importcompl.vim index 017d91a..cc26c79 100644 --- a/vim/.vim/autoload/python/importcompl.vim +++ b/vim/.vim/autoload/python/importcompl.vim @@ -9,7 +9,7 @@ " of all import lines from your code containing Baz import. " " If you have Pylint or Pyflakes output in quickfix window, containing -" unfedined variables errors, then you can you :call AllImportCompl() +" unfedined variables errors, then you can you :call python#importcompl#all() " function. It will go through the quickfix list and find all possible " imports, sort them and insert under current cursor position. " diff --git a/vim/.vim/ftplugin/python/importcompl.vim b/vim/.vim/ftplugin/python/importcompl.vim index d567875..5ae47ba 100644 --- a/vim/.vim/ftplugin/python/importcompl.vim +++ b/vim/.vim/ftplugin/python/importcompl.vim @@ -1,2 +1,3 @@ if exists("*python#importcompl#do") | finish | endif inoremap =python#importcompl#do() +cnoremap call python#importcompl#all() diff --git a/vim/.vim/ftplugin/python/lint.vim b/vim/.vim/ftplugin/python/lint.vim index a7d696a..7f92218 100644 --- a/vim/.vim/ftplugin/python/lint.vim +++ b/vim/.vim/ftplugin/python/lint.vim @@ -2,5 +2,5 @@ if exists("*python#lint#start") | finish | endif let b:lint_status_func=function("python#lint#status") sign define LN text=LN texthl=Error map :unlet! g:pylint_disable:call python#lint#start() -map [32~ :redraw!:copen +map [17;2~ :redraw!:copen autocmd BufWritePost *.py call python#lint#start()