Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Setting line numbers and smart indent in VIM editor

    • 0
    • 2
    • 0
    • 0
    • 2
    • 0
    • 0
    • 0
    • 225
    Comment on it

    Hello there,

                         If you recently had started learning programming and using vim editor to code. Then this blog might be useful for you as it can save a lot time while finding the line at which error occurred, apart from this this will take care of indentation while typing in the vim editor.


    To enable line number, and smart indent by default.

    (i) Open Terminal.

    (ii) Type vi ~/.vimrc and hit enter.

    vi ~/.vimrc
    

    (iii) Go into insert mode by pressing i.

    (iv) type :set nu on first line.

    (v) type :set smartindent on the next line.

    set: nu
    set: smartindent
    

    (vi) save the file.
    and now we are ready with the smart indent and line number in our vim editor.

 2 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: