Comments (7)
The quickest solution for you would be to add the following to your vimrc:
let g:SuperTabCrMapping = 0
When I get a chance I'll see if I can get supertab to properly handle your mapping, but unfortunately vim doesn't make it easy.
from supertab.
Cool, thanks. Out of curiosity, what is the issue? I tried understanding the code there but from what I can tell you send a <cr>
only if my <cr>
isn't mapped to something that includes <cr>
, and the part that checks for is let cr = (map =~? '\(^\|[^)]\)<cr>')
. Essentially, I'm interested in vimscript and was wondering what's different about my mapping that makes it difficult to work around.
from supertab.
Vim unfortunately makes it very difficult to chain mappings together, so supertab attempts to handle chaining it's mapping against an existing mapping and it tries to determine when it can issue it's own <cr>
without duplicating a <cr>
from the other mapping. Usually the presence of a <cr>
in the original is part of a <c-r>=SomeFunction<cr>
mapping where the <cr>
is simply telling vim that the <c-r>=
portion is completed, not a literal carriage return. In your case the <cr>
is a literal carriage return, so that's throwing it's code off a bit.
It looks like I'll have to update it to determine the context of the <cr>
in the existing mapping or mappings if multiple are already chained together, which happens.
from supertab.
I have a potentially related problem with abbreviations. When I do :iabbrev a a<cr>b
, it inserts two b's. let g:SuperTabCrMapping = 0
fixes it.
from supertab.
@mehultikekar
For your issue I've just updated supertab to not map to <cr>
if it detects an iabbrev
mapping with a <cr>
in it.
from supertab.
I get the double newline when the only plugins are supertab and the new version of tpope's endwise plugin*. Not sure which plugin is the cause since both had updates in the same timeframe. I'll also file an issue in endwise's repo.
from supertab.
Seems to have been resolved by tpope/vim-endwise#55
from supertab.
Related Issues (20)
- Supertab doesn't work in command-line window HOT 4
- 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
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.