GithubHelp home page GithubHelp logo

Comments (6)

ervandew avatar ervandew commented on August 26, 2024

The quick fix is to add the following to your vimrc:

let g:SuperTabCrMapping = 0

Before doing that though can you run the following in vim and send me the result:

:verbose imap <cr>

from supertab.

imajes avatar imajes commented on August 26, 2024

I couldn't figure out how to copy this, so here's the output of the imap:

http://x.imaj.es/E9N1

the mapping fix worked great.. thanks

On Sat, Feb 11, 2012 at 01:07, Eric Van Dewoestine
[email protected]
wrote:

The quick fix is to add the following to your vimrc:

   let g:SuperTabCrMapping = 0

Before doing that though can you run the following in vim and send me the result:

   :verbose imap


Reply to this email directly or view it on GitHub:
#32 (comment)

James Cox,
Consultant, Raconteur, Photographer, Entrepreneur
t: +1 347 433 0567  e: [email protected] w: http://imaj.es/
talk: http://twitter.com/imajes photos: http://flickr.com/imajes

from supertab.

ervandew avatar ervandew commented on August 26, 2024

I can reproduce your issue if I add the following mapping to my vimrc:

imap <CR> <C-G>u<CR>

What both supertab and endwise do before adding their own <CR> mapping, is to first look for an existing one, and if it exists, chain theirs to that one. Without the above mapping, both supertab and endwise will chain together successfully. Do you have a mapping like that in your vimrc? One way to track it down would be to temporarily remove endwise (and keep g:SuperTabCrMapping set to 0) then open vim and run the same :verbose imap <cr> which will let you know where that mapping was last set.

from supertab.

imajes avatar imajes commented on August 26, 2024

Yes, I have this mapping…. but i'm not sure why. :(

should i just remove it?

On Sun, Feb 12, 2012 at 18:37, Eric Van Dewoestine
[email protected]
wrote:

I can reproduce your issue if I add the following mapping to my vimrc:

   imap u

What both supertab and endwise do before adding their own <CR> mapping, is to first look for an existing one, and if it exists, chain theirs to that one.  Without the above mapping, both supertab and endwise will chain together successfully. Do you have a mapping like that in your vimrc? One way to track it down would be to temporarily remove endwise (and keep g:SuperTabCrMapping set to 0) then open vim and run the same :verbose imap <cr> which will let you know where that mapping was last set.


Reply to this email directly or view it on GitHub:
#32 (comment)

James Cox,
Consultant, Raconteur, Photographer, Entrepreneur
t: +1 347 433 0567  e: [email protected] w: http://imaj.es/
talk: http://twitter.com/imajes photos: http://flickr.com/imajes

from supertab.

ervandew avatar ervandew commented on August 26, 2024

It's a weird mapping since it triggers a new undo sequence every time you hit <cr> while in insert mode (so when you exit insert mode each undo will only undo up to the last <cr> during your insert sequence). You could comment it out and see if you encounter the situation that motivated you to add it. If you have no need for supertab's <cr> mapping, then I guess it's not currently causing you issues, but it could very well cause a problem with some other plugin down the line, hard to say.

I'm going to close this ticket since although supertab could look for and remove an undo break from the mapping, doing so probably isn't a good idea since it may be there for good reason and going down the path of removing any disruptive user created mapping could lead to a lot of potential problems.

from supertab.

imajes avatar imajes commented on August 26, 2024

Agreed- and for the record, this was sourced from another vim users's
.vimrc, so not everything has good probity :)

On Sun, Feb 12, 2012 at 19:13, Eric Van Dewoestine
[email protected]
wrote:

It's a weird mapping since it triggers a new undo sequence every time you hit <cr> while in insert mode (so when you exit insert mode each undo will only undo up to the last <cr> during your insert sequence). You could comment it out and see if you encounter the situation that motivated you to add it. If you have no need for supertab's <cr> mapping, then I guess it's not currently causing you issues, but it could very well cause a problem with some other plugin down the line, hard to say.

I'm going to close this ticket since although supertab could look for and remove an undo break from the mapping, doing so probably isn't a good idea since it may be there for good reason and going down the path of removing any disruptive user created mapping could lead to a lot of potential problems.


Reply to this email directly or view it on GitHub:
#32 (comment)

James Cox,
Consultant, Raconteur, Photographer, Entrepreneur
t: +1 347 433 0567  e: [email protected] w: http://imaj.es/
talk: http://twitter.com/imajes photos: http://flickr.com/imajes

from supertab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.