How to move to the nth letter in a line in VI

Posted on 2011-02-17
Last Modified: 2012-05-11

  I want to move to the 134th letter in a line, regardless of where my cursor is, in that sentence in VI editor.
  Is it possible? Please advise.

  Also, can i set numbers horizontally, just like how i do :set nu to set numbers vertically?
Question by:pvsbandi
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
LVL 45

Assisted Solution

by:Kent Olsen
Kent Olsen earned 500 total points
ID: 34917203
Hi pvsbandi,


should do it.  Where the last character in the command is the vertical bar.

Good Luck,

Author Comment

ID: 34917244
Thanks! I'll try that.
  Is there a way to set a ruler on top so i know which place i'm in the line?
LVL 45

Accepted Solution

Kent Olsen earned 500 total points
ID: 34917338

I don't know of a horizontal ruler function.  It might be that someone has installed the feature as proprietary extension, but it's not "standard".

^G (control-G) should display the cursor position on the bottom line.

Industry Leaders: 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!

LVL 68

Expert Comment

ID: 34917426
If your vi implemetation supports it you can issue

:set ruler

so you will see the current cursor position (line, column) in the lower right area of the command line.


Author Comment

ID: 34917645
:set ruler, unfortunately didn't work..
   But you guys are awesome!! Thanks so much!!
LVL 68

Expert Comment

ID: 34917658
You could use "vim" instead of "vi". "set ruler" will work with vim!


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
nodeip 9 98
FTP on FreeBSD server 2 167
Linux : can't create transaction lock on rpm.lock (Permission denied) 10 649
how to send mail in unix 2 50
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap ( Version 1.2 2.      Jpcap( Version 0.6 Prerequisite: 1.      GCC …
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…
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.

751 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