Coder Social home page Coder Social logo

<S-BS> doesn't work. about delimitmate HOT 12 CLOSED

raimondi avatar raimondi commented on June 12, 2024
doesn't work.

from delimitmate.

Comments (12)

alanchrt avatar alanchrt commented on June 12, 2024

I'm getting the same behavior. Glad you already noticed it!

from delimitmate.

Raimondi avatar Raimondi commented on June 12, 2024

Have you tried with the current github files?

from delimitmate.

alanchrt avatar alanchrt commented on June 12, 2024

Ah, no I haven't. I'll give it a shot..

from delimitmate.

alanchrt avatar alanchrt commented on June 12, 2024

Hmmm.

With the current source (and Vim 7.2), I still experience this behavior:

def test(|) => => def test

Am I misunderstanding how it's intended to work, or is this weird?

from delimitmate.

Raimondi avatar Raimondi commented on June 12, 2024

That was weird :)

I just committed some changes, could you see if it works for you now?

from delimitmate.

alanchrt avatar alanchrt commented on June 12, 2024

Dang. No dice. Are you able to reproduce it at all?

I get the same behavior still. I just tested it on another machine that didn't already have delimitMate installed, just to make sure it wasn't an installation issue.. same thing. First machine was Debian, and the other Ubuntu, both Vim 7.2.

from delimitmate.

Raimondi avatar Raimondi commented on June 12, 2024

I could reproduce it before commiting the last changes, although just in a special situation, but I can't reproduce it now, neither in MacOSX nor Ubuntu. I moved my ~/.vim to ~/.vimold and created a new .vim folder just with delimitMate. It'd be nice if you could take the time to do something like that or just try this (use vim instead if you prefer):

gvim -N -u NONE -U NONE
:source ~/.vim/autload/delimitMate.vim
:source ~/.vim/plugin/delimitMate.vim

and try again.

Thanks for helping me with this issue ;)

from delimitmate.

alanchrt avatar alanchrt commented on June 12, 2024

Ah! Figured it out. Tried it again on a different Ubuntu box, and still got the same result, so I looked into it more.

Check this out:
http://vim.wikia.com/wiki/Avoid_the_escape_key#Mapping_problems

I tried it in gvim, and it works like a charm.

Doing the <C-K> thing in insert mode to check a mapping, here is what I get in each environment:

  • gvim: Shift+Backspace => <S-BS>
  • gnome-terminal: Shift+Backspace => <BS>
  • xterm: Shift+Backspace => <BS>
  • rxvt: Shift+Backspace X 2 => ^H
  • aterm: Shift+Backspace X 2 => ^H

I don't really want to install KDE or XFCE to try some of their terminals, but some of them might actually work too.

So, I guess the problem is kind of on my end for not using a terminal that supports <S-BS> mapping. Maybe just throw a warning in the README for terminal users in case they face the same issue.

Do you have a terminal of choice that you've been able to use to map <S-BS>?

As a test, I added imap <S-Left> <S-BS> to my .vimrc (I wouldn't actually use that specific mapping in practice... I'll find something), and sure enough, I got the following result:

def test(|) => <S-Left> => def test(|

!!

from delimitmate.

alanchrt avatar alanchrt commented on June 12, 2024

I think I'll settle on this one, or switch to a terminal that supports <S-BS>:

imap ^\ <S-BS>

from delimitmate.

Raimondi avatar Raimondi commented on June 12, 2024

I work mostly on MacVim, that's why I couldn't reproduce the problem, now I tried with the mac terminal and <S-BS> doesn't work.

I'll put a note on the docs about this issue. Thanks for helping me with this.

from delimitmate.

alanchrt avatar alanchrt commented on June 12, 2024

No problem. Glad to have it all sorted out!

from delimitmate.

roachsinai avatar roachsinai commented on June 12, 2024

Hi @Raimondi thanks for your plugin, what you posted in the doc told me that may not work in some terminal.

But what you posted sames there is a way to make it by delimitMate#JumpAny(),

NOTE that this will not usually work when using Vim from the
terminal, see 'delimitMate#JumpAny()' below to see how to fix it.

And after read I did't find how to let it work.

Thanks for any hints!

from delimitmate.

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.