Comments (5)
I have made it work as I like it with SuperTab without even remapping <Tab>
. It took me some time reading through small print in SuperTab docs.
The trick is in setting buffer option in ftplugin/python.vim
let b:SuperTabContextDefaultCompletionType = '<C-x><C-u>'
which is equivalent to remapping <Tab>
and makes SuperTab trying to call completition with Completor in Python but retain all other behavior.
For the posterity my .vimrc [all SuperTab options set explicite are default.]
let g:completor_auto_trigger = 0
" Supertab
let g:SuperTabDefaultCompletionType = "<C-p>"
let g:SuperTabDefaultCompletionType = 'context'
let g:SuperTabContextTextOmniPrecedence = ['&completefunc', '&omnifunc']
let g:SuperTabMappingForward = "<Tab>"
let g:SuperTabCrMapping = 1
My question - how to toggle Completor On/Off still remains relevant I think but less urgent.
from completor.vim.
You can use this option to allow completion only for specified file types.
To totally disable completion you can use command CompletorDisable
, To reenable use CompletorEnable
.
from completor.vim.
Thank you. I have figured that out going through code. I use call completor#enable()
Finally I have removed SuperTab at least for now - too much spaghetti thrown at the wall.
I am really, really enjoying using Completor. Works really nice.
However I am not entirely understanding how it works.
-
Why completefunc turns out empty so often? Isn't it populated too late?
-
How do you insert snippets from Ultisnips? I see them on the list but using
<Tab>
or<Ctrl-Y>
or<CR>
doesn't do anything. So I use Ultisnips shortcut instead but is it the right way to go?
from completor.vim.
After some time I like your plugin more and more.
If I may suggest however there could be a buffer version of completor_auto_trigger
. That way one could enable automatic completion for certain file types with let b:completor_auto_trigger = 1
.
This is different then whitelisting some filetypes.
I also find the logic of completor (with auto_trigger off) a little frustrating. If I got it right from reading code CompletorEnable really comes to calling s:set_events() function which is calling s:on_text_change() and s:on_insert_char_pre().
The completion works only after typing some word (for example let
) but if you move cursor to another line and put it on exact same let
no completion happens. This is counterintuitive and frustrating. If completor is enabled it should trigger always and have the same efffect on identical words.
And now embarrasing question. What would g:completor_text_omni_trigger regex look like? I couldn't figure that out for thesaurus completion in plain text or markdown.
from completor.vim.
Why completefunc turns out empty so often? Isn't it populated too late?
Currently the completion status is tracked from the last completion triggered by inputting some chars. If the cursor moved to a different location with the same completion prefix the status will not change if no char inputted so completion menu may not popup at the right place. So the completion result is cleared after every completion.
How do you insert snippets from Ultisnips? I see them on the list but using
<Tab>
or<Ctrl-Y>
or<CR>
doesn't do anything. So I use Ultisnips shortcut instead but is it the right way to go?
The snippets on the completion list are only a reminder to show that there are some utilsnips here. It should be triggered using Ultisnips shortcut.
And now embarrasing question. What would g:completor_text_omni_trigger regex look like? I couldn't figure that out for thesaurus completion in plain text or markdown.
dictionary
and thesaurus
completions are not supported by completor currently. But you can use vim builtin completions.
from completor.vim.
Related Issues (20)
- A source for ctags?
- the fallback completer: complete form the current buffer, not from all buffers? HOT 1
- Integrate ALE completion HOT 2
- LanguageServer.jl LSP support
- Just show the function arguments over it with Jedi HOT 1
- 能否改进一下候选项的顺序
- The completed word is inserted in the wrong position, if a german umlaut is present in the current line.
- can I use pyls with completor.vim ?! HOT 1
- self.ident is HOT 1
- start_column() doen't work for non english words
- using arrow keys instead of ctrl+n
- 中文补全时会吞掉标点之前的部分字符 HOT 1
- Tweaking LSP trigger accordingly
- Validator requires vim compiled with python or python3 and has features `job`, `timers` and `lambda` HOT 1
- iskeyword option
- Getting completion for R programming
- Cannot get to work on msys2
- Placeholders for function arguments - integration with CompleteParameter.vim HOT 2
- Any updates so far, generally speaking?
- How to log an LSP output without the use of `let g:completor_debug = 1`?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from completor.vim.