Steps to Reproduce:
Deleting a whole word while holding option "meta" key does not work. One character is deleted. In the regular terminal for os x in preferences there is a checkbox that lets you enable the option key to be used as a meta key which allows holding the option key and hitting delete to delete an entire word at a time.
+1 for this :)
👍
ctrl+w does this now, you should be able to do this by remapping keys to send the escape sequence you want (^W).
Actually maybe you can't do that now as the same escape sequence is sent regardless of whether alt/option was pressed. I filed this upstream https://github.com/sourcelair/xterm.js/issues/486
Option key is more than just for deleting. There is a couple of great thing you can do with option key, delete is only one thing from that. :)
@adamluzsi any others in particular that you can do with other terminals but not vscode?
@Tyriar All I use it for personally is moving one word at a time as opposed to one letter. Moving includes deleting and using arrow keys.
Thanks, we're looking into how to solve this problem in the general case so we can remove some of the non-standard keybindings we hard coded into the terminal code https://github.com/sourcelair/xterm.js/issues/487
Essentials: Arrow keys, backspace, d (delete current word), c (capitalize), l (lowercase), u (uppercase) but see https://en.wikipedia.org/wiki/GNU_Readline and http://www.aboutlinux.info/2005/08/bash-shell-shortcuts.html.
+1 for this
👍
On OSX "Use Option as Meta Key" is a setting in the default Terminal app. All this does is change the functionality of Option to send the Meta key instead (as opposed to typing in special characters such as ∂, not very useful on a Terminal IMO). The Meta key is then used for whatever by whatever application you run within it. A List of Features that the Option key "should do" is not really the right solution for this. For example, when using tmux, I have Meta-Z bound as my prefix for commands; so to split a pane I first press Option-Z (Meta-Z) and then \. This does not work in the VSCode integrated terminal, and no amount of feature documenting is going to fix that.
I think that the change that is needed here is a similar option for the Integrated terminal on OSX to support the Meta key within the terminal. I realise this may be an issue with the underlying terminal library itself, however.
Is there an issue to track regarding the feature to Use Option as a Meta key in sourcelair/xterm.js?
My personal favorite is alt+. which inserts the last argument from the previous command. Any progress on this issue? I don't see any comments in the upstream issue since January.
I would love to move forward/back by word meta + b, meta + f as well.
Any update on this? Happy to put up a PR for this
+1
Actually I just saw https://github.com/Microsoft/vscode/issues/31262 which has a pretty nice solution to this:
@mikelward
Originally https://stackoverflow.com/questions/45257525/ctrlc-inside-vscode-terminal
Inside the integrated terminal, I'd like to be able to make
Ctrl+C/Ctrl+Vcopy and paste, and haveCtrl+Shift+CandCtrl+Shift+Vsend literalCtrl+C/Ctrl+V.I can do the first two by setting custom key bindings for
workbench.action.terminal.copySelectionandworkbench.action.terminal.paste.It looked like maybe I could do the second two using
workbench.action.terminal.sendText, but when I try it I getcommand 'workbench.action.terminal.sendText' not found, presumably because it's not defined interminalActions.ts.And if it was available as a command, I'm not sure how I'd pass arguments, or specify control characters. I would try something like:
{ "key": "ctrl+shift+c", "command": "workbench.action.terminal.sendText", "args": ["\003", false], "when": "terminalFocus" }but maybe something more explicit would be better.
@raphadko
This would be incredibly useful for running all sorts of commands in the terminal. For example I would like to create a macro to switch to terminal and run the last command I ran (CTRL + P) or (arrow up), currently I can't find a way to do this.
@jingweno if you're still up for doing a PR you can try exposing the workbench.action.terminal.sendText command to be accessible via keybindings.json as in the above comment.
Same story for Alt + . (not working. For linux - last argument in terminal)
Another case: https://github.com/Microsoft/vscode/issues/31823
Found a temporary solution. Add the following to your ~/.inputrc file:
"ƒ": forward-word
"∫": backward-word
"≥": yank-last-arg
And restart your terminal (or run bind -f ~/.inputrc). _I tested the above on Hyper terminal, but should work in vscode as well._
Brilliant! That works in vscode. Thanks!
On Fri, Jan 19, 2018 at 3:22 AM, Saad Malik notifications@github.com
wrote:
Found a temporary solution. Add the following to your ~/.inputrc file:
"ƒ": forward-word
"∫": backward-word
"≥": yank-last-argAnd restart your terminal (or run bind -f ~/.inputrc). I tested the
above on Hyper terminal, but should work in vscode as well.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/11314#issuecomment-358897328,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFfSiw0XXjhWtR3ZMy8MvXwiM52do6Rks5tMFDHgaJpZM4JxsB9
.
@DiegoSalazar cool!
btw I think this is an even better option: Mac OSX: altIsMeta support! If @Tyriar is okay with the PR, then you'll probably need to make a corresponding change in VScode to enable altIsMeta.
Noticed a problem though, on vscode after applying your fix to .inputrc I
was no longer able to press the regular b key! I can type f normally, but
the terminal ignores the b key :/
On Fri, Jan 19, 2018 at 3:44 PM, Saad Malik notifications@github.com
wrote:
@DiegoSalazar https://github.com/diegosalazar cool!
btw I think this is an even better option: Mac OSX: altIsMeta support
https://github.com/xtermjs/xterm.js/pull/1225! If @Tyriar
https://github.com/tyriar is okay with the PR, then you'll probably
need to make a corresponding change in VScode to enable altIsMeta.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/11314#issuecomment-359083631,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFfSmgEXNWaMrQBnPrHHZhupEuWNCiTks5tMP6ZgaJpZM4JxsB9
.
@DiegoSalazar oh really! That's actually a lot worse than not being able to jump between words. btw the altIsMeta fix will probably be merged soon. In the interim you can also use 'ESC'+b, 'ESC'+f, etc. to jump between words.
Here's the setting:
"terminal.integrated.macOptionIsMeta": true
Most helpful comment
On OSX "Use Option as Meta Key" is a setting in the default Terminal app. All this does is change the functionality of Option to send the Meta key instead (as opposed to typing in special characters such as ∂, not very useful on a Terminal IMO). The Meta key is then used for whatever by whatever application you run within it. A List of Features that the Option key "should do" is not really the right solution for this. For example, when using
tmux, I haveMeta-Zbound as my prefix for commands; so to split a pane I first pressOption-Z (Meta-Z)and then\. This does not work in the VSCode integrated terminal, and no amount of feature documenting is going to fix that.I think that the change that is needed here is a similar option for the Integrated terminal on OSX to support the Meta key within the terminal. I realise this may be an issue with the underlying terminal library itself, however.