Solved

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

Posted on 2011-02-17
6
367 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
  • 2
  • 2
  • 2
6 Comments
 
LVL 45

Assisted Solution

by:Kdo
Kdo earned 500 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 45

Accepted Solution

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



Kent
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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

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

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 …
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
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.

762 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

17 Experts available now in Live!

Get 1:1 Help Now