Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Add: easy way to send esc to the shell layer#3170

Closed
cljoly wants to merge 1 commit into
wsdjeg:masterfrom
cljoly:term-esc
Closed

Add: easy way to send esc to the shell layer#3170
cljoly wants to merge 1 commit into
wsdjeg:masterfrom
cljoly:term-esc

Conversation

@cljoly

@cljoly cljoly commented Oct 19, 2019

Copy link
Copy Markdown

Add a simple key binding to send Esc in a terminal.

PR Prelude

Thank you for working on SpaceVim! :)

Please complete these steps and check these boxes before filing your PR:

  • I have read and understood SpaceVim's CONTRIBUTING document.
  • I have read and understood SpaceVim's CODE_OF_CONDUCT document.
  • I understand my PR may be closed if it becomes obvious I didn't actually perform all of these steps.

I preserved indentation in shell.vim, despite the conventions, because it existed there. Let me know if you prefer I don’t adapt spacing.

Why this change is necessary and useful?

Fairly often, you need to send the <Esc> key in a terminal, especially with fzf to cancel current input. I think this change provides an handy way to do this, without changing existing habits.

@cljoly cljoly changed the title Add an easy way to send esc to the shell layer Add: easy way to send esc to the shell layer Oct 19, 2019
Add a simple key binding to send Esc in a terminal.
@cljoly

cljoly commented Nov 4, 2019

Copy link
Copy Markdown
Author

Ping 😁 ?

@wsdjeg

wsdjeg commented Feb 18, 2020

Copy link
Copy Markdown
Owner

exe 'tnoremap <silent><esc><esc> <esc>' will make <esc> slow. vim will wait for second key.

@cljoly

cljoly commented Feb 18, 2020

Copy link
Copy Markdown
Author

That’s true. Perhaps another keybinding would be more suitable?

@wsdjeg

wsdjeg commented Dec 20, 2020

Copy link
Copy Markdown
Owner

@cljoly hello, maybe we should remove tnoremap <silent><esc> <C-\><C-n> in spacevim.

@cljoly

cljoly commented Dec 21, 2020

Copy link
Copy Markdown
Author

I think it would be a good idea to replace it with another binding too.

@wsdjeg

wsdjeg commented Oct 17, 2021

Copy link
Copy Markdown
Owner

@cljoly Hi, we will add new key binding ctrl-` to toggle terminal windows. and the esc will not be mapped any more. so this issue will be fixed soon.

@cljoly

cljoly commented Oct 17, 2021

Copy link
Copy Markdown
Author

That’s great, thanks @wsdjeg !

wsdjeg added a commit that referenced this pull request Oct 17, 2021
Problem: There is no way to send Esc to terminal
Solution: revert Esc in terminal, add ctrl-` key binding to
hide terminal from terminal mode.

merge: #3170
BREAKING CHANGE: revert key binding `<Esc>` in terminal mode
Co-authored-by: Clément Joly <oss@171819.xyz>
@wsdjeg

wsdjeg commented Oct 17, 2021

Copy link
Copy Markdown
Owner

merged in: f6ac73b

@wsdjeg wsdjeg closed this Oct 17, 2021
@wsdjeg

wsdjeg commented Oct 17, 2021

Copy link
Copy Markdown
Owner

sorry, I have add Co-authored-by: Clément Joly <oss@171819.xyz> into the commit message, but it seems this email has not been added to your github account. so the commit do not include your profile link.

@cljoly

cljoly commented Oct 17, 2021

Copy link
Copy Markdown
Author

sorry, I have add Co-authored-by: Clément Joly <oss@171819.xyz> into the commit message, but it seems this email has not been added to your github account. so the commit do not include your profile link.

The email should be oss@131719.xyz, but I might have misconfigured something. It’s not a problem, don’t worry :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants