frontend icon indicating copy to clipboard operation
frontend copied to clipboard

feature request: Tab insertion in code blocks

Open anrilyske opened this issue 2 years ago • 6 comments

What do you want to see?

Please add tab insertion for code blocks, whenever I press Tab on my keyboard, it does not insert an indent. I have to manually press space 4 times. When I press tab, it instead it uses the keyboard quick navigation function.

So in short, its a good idea to add the feature that until a ``` is closed, Revolt should listen for indentation insertion.

anrilyske avatar Apr 14 '23 14:04 anrilyske

Wrong repository but this is a good idea, transferring issue.

insertish avatar Apr 14 '23 14:04 insertish

Revite already has a mechanism for detecting when the user is typing in a code block; this could probably be converted and reused for this as well

Rexogamer avatar Apr 14 '23 14:04 Rexogamer

i'm new to contributing this project. i figured i'd pick this up since it seems simple enough to add.

should this also include the ability to remove tab spacing with Shift+Tab? i know some text/code editors like VSCode allow you to do this, but idk if it's a very common functionality, or if it's even desired in this context.

sharkaccino avatar Apr 22 '23 10:04 sharkaccino

I didn't even know that's a shortcut, I usually select lines and use Ctrl + [ / ]. That would be fine, I don't think anyone would accidentally hit Shift+Tab but it would be useful for those who use it. I think if that were to be added I would probably figure out a way to implement Ctrl + [ / ] too down the line.

insertish avatar Apr 22 '23 10:04 insertish

i've never heard of that shortcut either... huh. guess we both learned something today LOL

anyway i could probably find a way to implement that too. not sure if it'll be in this same PR, but i'll look into it later today or tomorrow :)

sharkaccino avatar Apr 22 '23 10:04 sharkaccino

should this issue still be open?

sharkaccino avatar Jun 01 '24 20:06 sharkaccino

I can confirm this issue is resolved when running the latest version of the revolt frontend from this repo locally (running commit 30abe9801eaac3268a8fe0df04b4987acd7d734d)

CodeF53 avatar May 28 '25 22:05 CodeF53