From 244b09bf4e3eaaa651afb20edc748840f0907445 Mon Sep 17 00:00:00 2001 From: Benjamin Kane Date: Mon, 27 Nov 2017 21:44:30 -0500 Subject: [PATCH 1/3] Add Python docstring Optional Configuration Tip --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index fc263cf..67bdcf9 100644 --- a/README.md +++ b/README.md @@ -194,6 +194,19 @@ inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" ``` +- Show and auto-close docstrings for Python completion + +```vim + " Add preview to see docstrings in the complete window. + let g:cm_completeopt = 'menu,menuone,noinsert,noselect,preview' + + " Close the preview window automatically on InsertLeave + " https://github.com/davidhalter/jedi-vim/blob/eba90e615d73020365d43495fca349e5a2d4f995/ftplugin/python/jedi.vim#L44 + augroup ncm_preview + autocmd! InsertLeave if pumvisible() == 0|pclose|endif + augroup END +``` + - If 'omnifunc' is the only available option, you may register it as a source for NCM. From 9c1e90d4ac6829f7cb98a198374e8b07fa7cdfe2 Mon Sep 17 00:00:00 2001 From: Benjamin Kane Date: Tue, 28 Nov 2017 16:51:35 -0600 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 67bdcf9..1100d6c 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,7 @@ inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" ``` -- Show and auto-close docstrings for Python completion +- Show and auto-close docstrings for Python completion (See [here](https://stackoverflow.com/q/3105307/2958070) for more information. ```vim " Add preview to see docstrings in the complete window. From e38bb963234cd89de65632cbec7ac88ad811a313 Mon Sep 17 00:00:00 2001 From: Benjamin Kane Date: Tue, 28 Nov 2017 16:52:09 -0600 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1100d6c..c7122f3 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,7 @@ inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" ``` -- Show and auto-close docstrings for Python completion (See [here](https://stackoverflow.com/q/3105307/2958070) for more information. +- Show and auto-close docstrings for Python completion (See [here](https://stackoverflow.com/q/3105307/2958070) for more information) ```vim " Add preview to see docstrings in the complete window.