-
Notifications
You must be signed in to change notification settings - Fork 358
Add cmd-delete-word-back command
#1409
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
Conversation
Implementation of zsh-like backwards word deletion.
|
@janpeterd Thanks for your contribution. I am not sure if you have seen this yet, but there is a set of guidelines for first-time contributors. Regarding your changes, I think it is better to not add the BTW I think the line editing in One other thing I noticed is that you have saved the deleted text in the yank buffer for |
|
@janpeterd Thank you very much for working on this. @joelim-work I don't remember anything about the missing yank for @janpeterd I agree with @joelim-work in that Not quite related to this discussion, but I'm thinking of moving the Contributions wiki page to the repository. I think it is more common to find it in the repository. It is also mostly intended for developers so it should be separate from the content intended for users (i.e. wiki). |
|
I removed the configuration option and mapped the command by default to |
cmd-delete-word-back command for zsh/vim-like word deletion cmd-delete-word-back command
joelim-work
left a comment
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.
Looks mostly good, just a couple of very minor comments.
doc.go
Outdated
| cmd-word (default '<a-f>') | ||
| cmd-word-back (default '<a-b>') | ||
| cmd-delete-word (default '<a-d>') | ||
| cmd-delete-word-back (default '<a-backspace> and <a-backspace2>') |
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.
I think you made a small typo:
| cmd-delete-word-back (default '<a-backspace> and <a-backspace2>') | |
| cmd-delete-word-back (default '<a-backspace>' and '<a-backspace2>') |
opts.go
Outdated
| gOpts.cmdkeys["<a-backspace>"] = &callExpr{"cmd-delete-word-back", nil, 1} | ||
| gOpts.cmdkeys["<a-backspace2>"] = &callExpr{"cmd-delete-word-back", nil, 1} |
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.
Very minor, but I would suggest to move this to just under cmd-delete-word to group them together.
|
@gokcehan I don't have any issues with moving the contribution guidelines to |
|
@joelim-work typo corrected and block of code moved. |
|
Looks good to me as well. Thank you @janpeterd for the patch and @joelim-work for the review. By the way, both alt+d and alt+backspace save the deleted text in the yank buffer on my bash. I can see these commands are listed under "Killing and Yanking" in |
Related issues:
A new command
cmd-delete-word-backis added.A new configuration optionunixwordsis added.Docs about this command added.
This is my first pull request and I am inexperienced in
go. So any feedback or suggestions are welcome.