-
Notifications
You must be signed in to change notification settings - Fork 132
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
support paste and undo #51
Conversation
e29400e
to
1d98c2c
Compare
For me undo works correctly if I bind |
it only works for bash ,not for zsh . |
dd952f7
to
124429b
Compare
Also, the way yanking is currently implemented is that elisp code sends the characters one by one to the terminal, which is not the most optimised way to go about it |
@jixiuf But why does |
I like to support bracket paste. But to keep the code simple, can we just use the old char by char code and add a special key like |
124429b
to
77ec46e
Compare
done |
77ec46e
to
4fd1f2c
Compare
vterm.el
Outdated
@@ -137,6 +137,7 @@ for different shell. " | |||
(define-key vterm-mode-map (kbd "C-c C-c") #'vterm-send-ctrl-c) | |||
(define-key vterm-mode-map (kbd "C-_") #'vterm--self-insert) | |||
(define-key vterm-mode-map (kbd "C-SPC") #'vterm--self-insert) | |||
(define-key vterm-mode-map (kbd "C-/") #'vterm-undo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should keep it aligned with the rest
vterm.el
Outdated
(interactive) | ||
(vterm-send-key "_" nil nil t)) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra blank line does not match coding style of the file
vterm.el
Outdated
@@ -176,16 +177,26 @@ for different shell. " | |||
(interactive) | |||
(vterm-send-key "c" nil nil t)) | |||
|
|||
(defun vterm-undo() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space between function name and parameter list. I thought it wouldn't even work without a space in Elisp ?
Does it mean that we will never ever have a fast paste ? |
21e9b00
to
f42b941
Compare
Nope, but I want to try the simple approach first and if it's not sufficient, we can optimize it. |
Thanks again for your efforts @jixiuf ! |
No description provided.