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

Please support M-l, M-u #23

Closed
ganaware opened this Issue Jan 11, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@ganaware
Copy link

ganaware commented Jan 11, 2019

Please support M-l, M-u:

https://www.gnu.org/software/emacs/manual/html_node/emacs/Case.html

  • M-l
    • Convert following word to lower case (downcase-word).
  • M-u
    • Convert following word to upper case (upcase-word).
@tuttieee

This comment has been minimized.

Copy link
Owner

tuttieee commented Jan 13, 2019

I will simply assign M-l and M-u to editor.action.transformToLowercase and editor.action.transformToUppercase respectively, to which C-x C-l and C-x C-u are now assigned.

Strictly speaking, this is different from the original behavior of Emacs, on which M-l and M-u work on a different manner from C-x C-l and C-x C-u.
However, on VSCode, editor.action.transformToLowercase and editor.action.transformToUppercase work very similarly to both commands according to selection state:

  • If some regions are selected, editor.action.transformTo(Lower|Upper)case converts the region.
  • If no regions are selected, editor.action.transformTo(Lower|Upper)case converts the word next to the cursor.

I think this is more convenient than to set keybindings to emulate the original Emacs' behavior strictly.

@ganaware

This comment has been minimized.

Copy link

ganaware commented Jan 14, 2019

Assigning M-l and M-l to editor.action.transformToLowercase and editor.action.transformToUppercase is good work.

But I think, what is important for M-u and M-l is that they move cursor in additon to upcase (or downcase) word. For example, I can upcase all words of "awesome emacs keymap" only by typing M-u M-u M-u.

If M-u and M-l executed the following command sequences, they would be more resemble to the original Emacs, I think.

  1. emacs-mcx.cursorWordRight
  2. editor.action.transformTo(Lower|Upper)case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment