Comments (2)
Unless I'm miss understanding you, this works as intended. When using <c-p>
or <c-n>
to start insert completion, both populate the completion popup with the same list of words in the same order, the only difference is that <c-p>
highlights the nearest matching word located above the current cursor position, which is the result at the bottom of the completion popup. Without supertab installed, continuing to hit <c-p>
will walk up the list to next nearest word above the cursor. I think Bram chose to display the results like this so that a) the completion logic is the same for <c-n>
and <c-p>
, only the first entry to highlight differs, b) so that the behavior of <c-p>
mode is consistent, always moving up the list and c) when starting <c-p>
mode you don't have to switch over to using <c-n>
to get the next nearest entry, just continue to hit <c-p>
.
So, with supertab I wanted to preserve the same behavior. If <c-p>
is your default completion method, then <tab>
will start it and additional <tab>s
will move up the list instead of down so that you don't have to suddenly switch to using <s-tab>
to get the next nearest result.
from supertab.
Hi @ervandew. I appreciate your explanation (just like you also explained in the Readme). I believe I understand this fully, but I am not 100% sure.
So perhaps my question might really technically be for Bram, but I am hopeful that you know whether it is possible to configure things to my liking. I'm also hopeful that my preference might be shared by others.
- The behavior of first highlighting the matching item in the buffer before/above the cursor is absolutely a great default. I had been using supertab for a bit and this basic heuristic appears to account for a lot of its magic! It is such a simple trick to start from the bottom by default, it picks a better starting point almost always. I'd never have thought to try that, so thanks for making this the default for supertab.
I'm used to using other completion plugins, and supertab is the most "low level" one that I have used yet. There is no way I would put up with typing anything more than one tab keystroke (such as two consecutive chords, which I understand is needed for not using a completion plugin?) to prompt completion. Usually I'd prefer the behavior from some completers such as auto-displaying it as you type, but I am definitely taking a liking to the "speak when you're told" demeanor now. Sorry, I digress.
-
Many of us are understandably pretty used to the completion menu focus starting at the top and moving downward. I have no intrinsic problem with the upward motion, it is different from what i'm used to, but the main usability "problem" if you will is that the point of focus on the screen jumps an inconsistent amount of lines lower on the screen when the completion menu is invoked. The solution to this would be to make all of the behavior exactly the same but reverse the display of the menu. I understand that this is entirely outside of the purview of Supertab, but do you know if configuration exists in vim (or neovim, which, ironically i use with supertab only with nvim, i use coc.nvim when running vim and it handles completion for me) to reverse the results, putting the nearest match above the cursor on the TOP of the menu instead of the bottom? There is a certain elegance to the order of the results matching the scan order of those results... so I also wonder, if reversal of the list isn't possible, then what about displaying that menu ABOVE the cursor instead of below it!?
-
This is actually off-topic, but I couldn't help myself from adding this question in, even though I know the answer... I really like the minimalism of this plugin but I just wish I could type the initial letters of a symbol and have it prioritize picking it. e.g.
my_var_name
can get sorted first when I typemvn<tab>
. I know this is sort of the purview of a fuzzy completer, which this is not. But having a few simple but highly useful heuristics is a lot less complex compared to full-out fuzzy (which is more of an engine than just a few heuristics). Yes the answer is use a fancier completer plugin. Maybe there's ways with omnicomplete? I don't know much about how the omni thing works yet.
Thanks!
from supertab.
Related Issues (20)
- Mirror-like auto-completion pop-up when there is no space above the cursor!
- vim writes 4 spaces instead of a tab when supertab is installed HOT 4
- Tab inserts the highlighted word
- Inconsistency with inserting highlighted word HOT 1
- Remap tab when no completion is active HOT 2
- Toggle supertab plugin HOT 1
- Completion seems to offer key word in preference to omni completion HOT 1
- E432: Tags file not sorted: tags HOT 1
- Make tab cycle through completions
- Using mac os native command+tab to swap between elements enters in fast loop
- Supertab don't complete local path HOT 1
- Disable for a filetype HOT 3
- How to complete function name without '(' char? HOT 1
- On-the-fly completion HOT 1
- Supertab shows other suggestions as OmniComplete HOT 1
- Missing highlight update in popup completion menu HOT 4
- Select the last item when pressing Tab HOT 2
- [feature request] - incremental/partial completion instead of longest/complete match HOT 1
- Suptertab chaining is not working with neovim LSP HOT 2
- supertab insert mapping does not exist after installing supertab HOT 2
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 supertab.