How do I type numbers in vi?

3

1

Sometimes when I have to do basic editing of a file or write a basic script when I'm working in Terminal, I use vi. The problem is that when I type numbers, it goes to that line. Is there a way to turn this off or get around this? Surprisingly, when I searched Google and Super User, I couldn't find anything on this.

CoffeeRain

Posted 2012-03-23T14:00:33.513

Reputation: 447

2Did you tried to press "Insert" before entering numbers? – Diogo – 2012-03-23T14:06:07.633

1

You might benefit from working through a vi tutorial (example)

– RedGrittyBrick – 2012-03-23T15:30:17.387

Answers

6

You need to get into insert mode by typing "i".

Scott C Wilson

Posted 2012-03-23T14:00:33.513

Reputation: 2 210

I am... (fifteen characters) – CoffeeRain – 2012-03-23T14:18:05.643

Are you perhaps using the numeric keypad without the Num Lock button pressed? – Scott C Wilson – 2012-03-23T14:19:02.117

My keyboard has just the line of numbers on the top. – CoffeeRain – 2012-03-23T14:34:05.013

Use the command ":se showmode" (no quotes) and make sure you are in Insert mode (it will show -- INSERT --) at the bottom of the screen. – Scott C Wilson – 2012-03-23T15:17:11.920