How to transform a selected text to a low box in Vscode?

Asked

Viewed 1,058 times

1

I would like to turn a snippet of code into a low box in Vscode. Get a similar effect to CTRLSHIFTY of the Eclipse?

Something similar to the gif below:

transformando trecho de código em caixa baixa usando Eclipse

  • 4

    The one I know is selecting the text, Ctrl+Shift+P and type "Power" (or upper), with the "Transform to Lowercase" option. Serves?

  • @Woss, the problem is non-sequential text =/ I’m trying to see here how to register shortcuts, but I’m not getting access to settings in flat mode, only through the GUI

  • I’m not sure I understand the "non-sequential text" xD

  • It’s an excerpt from SQL where the company’s standards say "lower case names" and "upper case SQL keywords". My file per hour is all in high box, so I wanted to rename the columns/tables to lower case, but not column types nor the CREATE TABLE.

  • I got to do mine Binding, but I must say that the GUI is horrible. I’ll see if I can access some more textual way of doing things

  • If it comforts you, Datagrip has this option in the settings (https://i.stack.Imgur.com/Tyqfx.png) and just use Ctrl-Alt-L to format the full xD file

  • @Woss, it comforts a lot! But you’d have to change all the questions to suit that

Show 2 more comments

1 answer

2


Guy VS Code has a way to search and replace strings using regex Here’s an article that might help you with that https://dev.to/rfornal/vs-code-search-and-replace-regex-mn2

inserir a descrição da imagem aqui

But since I don’t know Regex here is a manual example. But I only managed to do it with one string at a time... Remember that you can also define if you want to use the case sencitive in the substitution

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui


Creating a Shortcut

You can create a keyboard shortcut to transform what is selected to Upper, or Lower Case as image below. Just go to the Settings and look for Keyboard Shortcut

inserir a descrição da imagem aqui

  • I couldn’t get the specific letter to change case. o \U in the replace that I would expect to do the job didn’t do it =/

  • @Jeffersonquesado edited with the option of you create a shortcut, then just you select and use the shortcut, only you will have to make a Shortcut to Upper and another to Low

Browser other questions tagged

You are not signed in. Login or sign up in order to post.