2

I need to retrieve the character position of a character in a file. How can I do this, using Vi?

lucapette
  • 20,564
  • 6
  • 65
  • 59
ZakTaccardi
  • 12,212
  • 15
  • 59
  • 107

1 Answers1

6

Search for the character that you want with:

/<char_you_want>

Then press Ctrl-g. You should see something like 45,28 in the bottom left. The second number is the position of the character. The first number is the line number.

Bryan Glazer
  • 852
  • 1
  • 10
  • 20