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

Posted on 2011-10-23
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
    LVL 15

    Accepted Solution

    n |       character n of current line

    sends you to the nth character of the current line.
    LVL 9

    Assisted Solution

    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
    LVL 9

    Expert Comment

    Sorry, vertical bar goes to the exact column number. Small case L moves from the current cursor position.
    LVL 1

    Author Comment

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

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
    I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now