Brad Parks
Brad Parks

Reputation: 71961

How to jump directly to a column number in Vim for short lines?

I'm editing a file in Vim. It's a text file with a lot of short lines.

I want to be able to insert a character at the 15th column of each line. Some lines are longer than 15 characters, some shorter.

I tried using the "|" operator to jump to column 15, (e.g. 15| ) but it doesn't work for the short lines.

How can I do this without manually spacing out each line?

Upvotes: 1

Views: 133

Answers (1)

Kent
Kent

Reputation: 195039

set ve=all

then do your 15| and add text

set ve back if necessary.

for more information about ve option: :h 've'

Upvotes: 3

Related Questions