Alt-del to remove a word to the left in the REPL

the macOS terminal has this feature and it is very useful

Are you on Windows? If yes, try Ctrl+Backspace to delete one word to the left, and Ctrl+Delete to delete one word to the right.

What’s your question? Are you asking how to enable this on Windows? It’s really a feature of your terminal — the Julia REPL supports it if the terminal sends the appropriate key codes.

1 Like

I guess there are many variables here but on Win 11, WezTerm with nushell I can use Ctrl+Backspace to delete a word to the left, but this doesn’t work in the Julia REPL (Ctrl+Delete doesnt work outside the REPL either)

Hmmm. Seems it depends on the terminal after all. The VSCode console works OK, but the Win11 terminal does not process these key combinations correctly (but Ctrl+arrows works; also all these combinations work outside the REPL). Looks like it is worth opening an issue.

i am on macOS (14.4.1) and when i run the julia (1.10.0) REPL in a standard macOS terminal, the alt-del (nor ctrl-del, nor cmd-del, nor fn-del) delete the word, even tho alt-del does work in the terminal itself (zsh)

i was suggesting to add the feature to the REPL

In Terminal.app’s preferences, select “use option key as meta” in the “Profiles” tab under “Keyboard”

ty, works!