How do I type numbers in vi?

5,213

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

Share:
5,213

Related videos on Youtube

CoffeeRain
Author by

CoffeeRain

Updated on September 18, 2022

Comments

  • CoffeeRain
    CoffeeRain almost 2 years

    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.

    • Diogo
      Diogo over 12 years
      Did you tried to press "Insert" before entering numbers?
    • user5249203
      user5249203 over 12 years
      You might benefit from working through a vi tutorial (example)
  • CoffeeRain
    CoffeeRain over 12 years
    I am... (fifteen characters)
  • Scott C Wilson
    Scott C Wilson over 12 years
    Are you perhaps using the numeric keypad without the Num Lock button pressed?
  • CoffeeRain
    CoffeeRain over 12 years
    My keyboard has just the line of numbers on the top.
  • Scott C Wilson
    Scott C Wilson over 12 years
    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.