• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

vi test

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    vi test

    Crap! - How do you insert, cursor keeps moving....?

    #2
    Originally posted by stek View Post
    Crap! - How do you insert, cursor keeps moving....?
    :q!

    subl filename.txt
    Coffee's for closers

    Comment


      #3
      move cursor to where you want

      press :i

      escape when you've finished adding text.

      I'm not covering delete here as thats bound to confuse other readers.....
      merely at clientco for the entertainment

      Comment


        #4
        Originally posted by eek View Post
        move cursor to where you want

        press :i

        escape when you've finished adding text.

        I'm not covering delete here as thats bound to confuse other readers.....
        Isn't that the x thread?

        Comment


          #5
          Originally posted by eek View Post
          move cursor to where you want

          press :i

          escape when you've finished adding text.

          I'm not covering delete here as thats bound to confuse other readers.....
          Or

          o - for insert new line under where the cursor is

          or O for insert new line above where the cursor is is

          Comment


            #6
            Best to start with a new file if you're confused, so you don't screw up your existing one.

            To do this in vi, type:

            1GdG:w <return>
            "A life, Jimmy, you know what that is? It’s the s*** that happens while you’re waiting for moments that never come." -- Lester Freamon

            Comment


              #7
              Watching a novice struggling with vi for the first time is one of life's little pleasures

              Why on Earth didn't emacs become the de facto standard? - Infinitely better than vi
              Work in the public sector? Read the IR35 FAQ here

              Comment


                #8
                Originally posted by OwlHoot View Post
                Watching a novice struggling with vi for the first time is one of life's little pleasures
                I used to work with a guy who in all seriousness couldn't work Notepad because he was so used to vi. I ended up learning vi because that was easier than trying to fix the mess he left when using Notepad.
                Best Forum Advisor 2014
                Work in the public sector? You can read my FAQ here
                Click here to get 15% off your first year's IPSE membership

                Comment


                  #9
                  Originally posted by OwlHoot View Post
                  Watching a novice struggling with vi for the first time is one of life's little pleasures

                  Why on Earth didn't emacs become the de facto standard? - Infinitely better than vi
                  Because emacs v vi is a religious war with opinions more firmly held than ...
                  merely at clientco for the entertainment

                  Comment


                    #10
                    Ah vi. Dear old long-gone days of the 80s/90s. I wonder if my "muscle memory" would make my fingers do the right thing now. Probably not. Although I believe once learnt all you have to do is activate that memory so wouldn't take to long to become fluent again.
                    Hard Brexit now!
                    #prayfornodeal

                    Comment

                    Working...
                    X