Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-02-17
6
Medium Priority
?
375 Views
Last Modified: 2012-05-11
Hi,

  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?
0
Comment
Question by:pvsbandi
[X]
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
6 Comments
 
LVL 46

Assisted Solution

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

  134|

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


Good Luck,
Kent
0
 

Author Comment

by:pvsbandi
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?
0
 
LVL 46

Accepted Solution

by:
Kent Olsen earned 2000 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.



Kent
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 68

Expert Comment

by:woolmilkporc
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.

wmp
0
 

Author Comment

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

Expert Comment

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

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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

664 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