• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 378
  • Last Modified:

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

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
pvsbandi
Asked:
pvsbandi
  • 2
  • 2
  • 2
2 Solutions
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi pvsbandi,

  134|

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


Good Luck,
Kent
0
 
pvsbandiAuthor Commented:
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
 
Kent OlsenData Warehouse Architect / DBACommented:

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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
woolmilkporcCommented:
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
 
pvsbandiAuthor Commented:
:set ruler, unfortunately didn't work..
 
   But you guys are awesome!! Thanks so much!!
0
 
woolmilkporcCommented:
You could use "vim" instead of "vi". "set ruler" will work with vim!

0

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.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now