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

Need support for Rectangle operations #27

Open
okia opened this issue Nov 11, 2016 · 1 comment
Open

Need support for Rectangle operations #27

okia opened this issue Nov 11, 2016 · 1 comment

Comments

@okia
Copy link
Contributor

okia commented Nov 11, 2016

Any realistic Emacs workflow inevitably comprises Rectangle operations.
We should be able to support at least the following Rectangle-related keybindings:

Keybinding Description
C-x r r Copy rectangle to register
C-x r k Kill rectangle
C-x r y Yank rectangle
C-x r o Open rectangle, shifting text right
C-x r c Blank out rectangle
C-x r t Replace rectangle contents with string on each line
@okia
Copy link
Contributor Author

okia commented Nov 11, 2016

FYI: looking into it...
On relevant note, what is the procedure and/or protocol for becoming an assignee (for particular issue)?

okia added a commit to okia/vscode-emacs that referenced this issue Nov 29, 2016
Fix for issue hiro-sun#27.
The following operations are supported:
1. C-x r r 	Copy rectangle to register
2. C-x r i 	Insert rectangle from register
3. C-x r d 	Delete rectangle
4. C-x r k 	Kill rectangle
5. C-x r y 	Yank rectangle
6. C-x r o 	Open rectangle, shifting text right
7. C-x r c 	Blank out rectangle
8. C-x r t 	Replace rectangle contents with string on each line

Known issues:
Cursor movement(s). Above mentioned rectangle operations do differ
from Emacs as follows:
1. Cursor placement at the end of operation is different than Emacs'
The reason for that is setSelection's behavior inside the transaction
seems to be somewhat erratic, and using is somewhat complicated (and
not done at all for the moment).
TODO: This problem might be solvable on vscode-emacs side. INVESTIGATE!
2. Unlike Emacs, VSCode does not seem to treat cursor movement as
a part of transaction. Therefore, undo does not result in the same
cursor movement as with Emacs.
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

1 participant