5

Is there an easy way of selecting the text in vertical? Something similar to the action described here.

Why am I asking it? Because I would like to fix the indentation of an entire section in a couple of easy steps. I would prefer to avoid the option of selecting line by line and fixing the spaces every time.

4 Answers 4

8

In TeXstudio, you can select the blocks with
Ctrl+Alt+Shift+Left Mouse+Drag.

But I find easier to do it with Notepad++ (free) as advocated by @Sango.

2

I don't know of that feature in TeXstudio, i know it from UltraEdit. And there is the column mode in notepad++ (free), maybe that helps for a one-time use.

But if you want to fix the indentation, you can do that just by selecting the lines and then press Tab. There is also an indentation command in the idefix menu. If the indentation should be space instead of Tabs, this can be set in Options->configure->Editor "Use Spaces for tabs" (or something, i have the german setting enabled)

If you want to indent text in the line itself, that's another question. But that could be done via macros something like "Tab, move down, move left, tab...."

1
  • +1 it is not an answer to the question but it solves my "indentation" problem! danke sehr
    – Leos313
    Commented Aug 8, 2019 at 9:03
2

I know this thread is a bit old, but nonetheless I do believe there's some precious info to be added regarding TexStudio's vertical editing, which isn't so lackluster as one might be left to believe!

if you wish to create a cursor that spans several lines (for example, to remove some pesky spaces!), press and hold Ctrl and Altand either move the arrows or press and hold the left mouse button. Of course, be prepared for a huge mess if you decided to mix spaces with tabs - but that's not the program failing you!

As @Sango specified, there is also the possibility to press and hold Shift Ctrl Alt and use the arrows to move around. This is particularly interesting if you enjoy keyboard yoga, or you can use simply Shift Ctrl and, while keeping the left mouse button pressed, do the same thing!

Hope anyone finds this helpful!

0

It works with holding the 3 keys @emeryville mentioned and if you want or it is not handy holding three keys due to some keyboard's ergonomics, u can hold just the ctrl and then drag(with holding the left mouse button) to create cursors vertically without selecting and then select holding shift(after releasing the ctrl) or type/erase directly mirrored.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .