[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Can I move to position X in a record while editing in vi ?

Posted on 2011-10-23
Medium Priority
Last Modified: 2012-06-27
I'm fairly proficient with vi, just the basics though.

to go to a certain line it's :9 to go to line # 9.

but can I go to position X ? I can't access my file editor at the moment that has a position ruler, so in vi I'd like to go to position XX .

Is that possible ?
Question by:Alaska Cowboy
  • 2
LVL 15

Accepted Solution

alienvoice earned 300 total points
ID: 37015848
n |       character n of current line

sends you to the nth character of the current line.

Assisted Solution

raysonlee earned 200 total points
ID: 37015935
Type the number of times you want to repeat the command then followed by the command, e.g. 3l (letter L) will repeat move right (l) by 3 times.
n| (vertical bar) is for columns, not characters

Expert Comment

ID: 37015956
Sorry, vertical bar goes to the exact column number. Small case L moves from the current cursor position.

Author Comment

by:Alaska Cowboy
ID: 37019775
Great ! two good tips, and the character of the current line was especially helpful.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month19 days, 11 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question