Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backspace doesn't delete both delimiters from terminal #42

Closed
y opened this issue Oct 9, 2010 · 13 comments
Closed

backspace doesn't delete both delimiters from terminal #42

y opened this issue Oct 9, 2010 · 13 comments

Comments

@y
Copy link

y commented Oct 9, 2010

in the docs, it say S-BS will not work from terminal, but BS alone also doesn't work. it only deletes the opening delimiter.

@Raimondi
Copy link
Owner

Raimondi commented Oct 9, 2010

Could you send the out put of :DelimitMateTest ?

@y
Copy link
Author

y commented Oct 9, 2010

delimitMate Report
==================

* Options: (-) unset, (g) global, (b) buffer

(-) delimitMate_apostrophes = ''
(-) delimitMate_autoclose = 1
(-) delimitMate_balance_matchpairs = 0
(-) delimitMate_excluded_ft = ''
(-) delimitMate_excluded_regions = 'Comment'
(g) delimitMate_expand_cr = 1
(g) delimitMate_expand_space = 1
(-) delimitMate_matchpairs = '(:),{:},[:]'
(-) delimitMate_nesting_quotes = []
(-) delimitMate_quotes = '" '' `'
(-) delimitMate_smart_quotes = 1
--------------------

* Mappings:

IMAP
<Up>: is not set:
i  <Up>        * <C-O>gk
        Last set from ~/.vimrc
<Down>: is not set:
i  <Down>      * <C-O>gj
        Last set from ~/.vimrc
<PageUp>: is not set:
i  <PageUp>    * <C-\><C-O><C-U><C-\><C-O><C-U>
        Last set from ~/.vimrc
<PageDown>: is not set:
i  <PageDown>  * <C-\><C-O><C-D><C-\><C-O><C-D>
        Last set from ~/.vimrc
<S-Down>: is not set:
i  <S-Down>    * <Esc>v<Down>
        Last set from ~/.vimrc
<S-Up>: is not set:
i  <S-Up>      * <Esc>v<Up>
        Last set from ~/.vimrc
--------------------

* Showcase:

Open: (|)
Delete: |
Exit: ()|
Space: ( | )
Delete space: (|)
Car return: (
|
)
Delete car return: (|)

Open: {|}
Delete: |
Exit: {}|
Space: { | }
Delete space: {|}
Car return: {
|
}
Delete car return: {|}

Open: [|]
Delete: |
Exit: []|
Space: [ | ]
Delete space: [|]
Car return: [
|
]
Delete car return: [|]
Open: "|"
Delete: (|
Exit: ""|
Space: " | "
Delete space: "|"
Car return: "
|
"
Delete car return: "|"
Open: '|'
Delete: {|
Exit: ''|
Space: ' | '
Delete space: '|'
Car return: '
|
'
Delete car return: '|'
Open: `|`
Delete: [|
Exit: ``|
Space: ` | `
Delete space: `|`
Car return: `
|
`
Delete car return: `|`

@Raimondi
Copy link
Owner

Raimondi commented Oct 9, 2010

Was that from the terminal? BS seems to work there.

@y
Copy link
Author

y commented Oct 9, 2010

> echo $TERM_PROGRAM $TERM
Apple_Terminal xterm-color

BS works on macvim for me, but not on terminal.

@Raimondi
Copy link
Owner

Raimondi commented Oct 9, 2010

OK, what's the output of this, from the terminal:
:verbose imap

@y
Copy link
Author

y commented Oct 9, 2010

i  <BS>         @<Plug>delimitMateBS
        Last set from ~/.vim/bundle/delimitMate/plugin/delimitMate.vim

@Raimondi
Copy link
Owner

Raimondi commented Oct 9, 2010

Does work under terminal?
I'm not sure why it doesn't work on terminal but it does on macvim, the mappings are internal to Vim. Could you run :DelimitMateTest from the terminal?

@y
Copy link
Author

y commented Oct 9, 2010

the results of DelimitMateTest were identical for terminal and macvim.

under terminal preferences i had enabled "delete sends control-h". disabling that makes backspace work properly with delimitMate. but that's not ideal, since that option is necessary for many other situations to work properly, like remote terminals.

@Raimondi
Copy link
Owner

I can reproduce the problem. I'll try to find a workaround and I'll let you know.

@y
Copy link
Author

y commented Oct 10, 2010

thanks, much appreciated

@Raimondi
Copy link
Owner

Raimondi commented Nov 7, 2010

Put the following in your vimrc:

exec "set <BS>=\<C-H>"

That seems to fix the problem here, let's see how it goes on your end.

@y
Copy link
Author

y commented Nov 7, 2010

that works. thanks!

@Raimondi
Copy link
Owner

Raimondi commented Nov 7, 2010

Just for reference, you can see the whole list of terminal options with

:help terminal-options

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants