Skip to content

Allow tabs at the start of lines #715

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

Closed
pavelbraginskiy opened this issue Jun 21, 2018 · 3 comments
Closed

Allow tabs at the start of lines #715

pavelbraginskiy opened this issue Jun 21, 2018 · 3 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@pavelbraginskiy
Copy link

Currently, the tab key only does autocompletion, and can't insert actual tabs.

However, a lot of the time, I have a large amount of text, such as code, in a here-string @''@, where I want to put indentation.

Adding indentation is most useful at the start of lines, where autocomplete can't happen anyway, so it would be useful to have tab insert an actual tab at the start of a line.

Alternatively, since here-strings don't allow autocompletion anyway, make tab always insert a tab character while in the middle of a here-string.

@lzybkr
Copy link
Member

lzybkr commented Jun 21, 2018

If this is simply an ask to support pasting tabs, then it's a duplicate of #77 and is really part of a bigger issue captured in #579.

If you really want to insert explicit tabs, then we could follow how it's done in Emacs mode where you would type Ctrl+q first - that basically says insert the next character, whatever it might be, instead of invoking what it's bound to.

This function is not yet implemented in PSReadLine, but it would be the natural way to do this in Emacs mode, and I suppose it would be fine in Windows mode too.

@pavelbraginskiy
Copy link
Author

I often write short code snippets in here-strings, so it's not just pasting. The c-q solution isn't ideal but it's better than nothing.

@pavelbraginskiy
Copy link
Author

Though this includes pasting as well, since I rely on my terminal's built-in paste (ctrl-shift-v), which sends the copied text as keystrokes.

@StevenBucher98 StevenBucher98 added the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants