Questions tagged [rearrangement]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
138 views

Is it possible to align the results in the quickfix list in columns

Currently, when I view the quickfix list with :cw, the columns/pipes are not aligned, as in this example: I wonder if there is an option in vim or a plugin to rearrange the pipes so that they align ...
0
votes
1answer
397 views

Is it possible to chain multiple ex commands together with a single range?

I often want to move and indent code at the same time. Is it possible to do the following. Original text: 1: var x = foo(); 2: bar(x); Desired text: 1: setTimeout(function(){ 2: var x = foo(); ...
2
votes
3answers
86 views

Quickest way to move bracket at beginning of line to end of above line

What's the quickest (as far as anyone knows) way to change this: int main() { into this: int main() { provided the cursor is on the {?
3
votes
3answers
94 views

How can I toggle between single and multi-line expressions of arrays?

This is probably easier to explain with an example. I prefer expressing things like const array = { a: 1, b: 2, c: 3 } on a single line at first but eventually I might want to switch to const array ...
4
votes
3answers
250 views

Change or reverse order of arguments

A common task I run into is having to change the order of arguments. So, for example, I might have something like this: stringInsert( "text to insert", buffer ); and need to change it into this: ...
4
votes
2answers
370 views

Vertically rotate visual block

How would one vertically rotate a visual block of text? For example given this: h e l l o Select those characters in visual block and rotate them once: o h e l l As you see, every character is ...
22
votes
6answers
7k views

How to reverse the order of lines?

How can I reverse the order of lines so that the first line appears at the end and the last line appears first? (Could be all the lines in a buffer, an address range, or a linewise visual mode ...