vi question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • X37375787
    • Jul 2026

    #1

    vi question

    How can I copy and paste multiple lines in vi?

    I am a vi newbie, so please help out a fellow webhamster.

  • swedguy
    Confirmed User
    • Jan 2002
    • 7981

    #2
    copy 2 lines: 2yy

    paste: p

    Comment

    • JSA Matt
      So Fucking Banned
      • Aug 2003
      • 5464

      #3
      setenv EDITOR pico

      problem solved.

      Comment

      • X37375787

        #4
        Originally posted by swedguy
        copy 2 lines: 2yy

        paste: p

        s-wwweeeet, it worked

        Comment

        • swedguy
          Confirmed User
          • Jan 2002
          • 7981

          #5
          cut 2 lines: 2dd

          Comment

          • swedguy
            Confirmed User
            • Jan 2002
            • 7981

            #6
            Originally posted by Equinox



            s-wwweeeet, it worked
            of course

            Comment

            • X37375787

              #7
              Originally posted by JSA Matt
              setenv EDITOR pico

              problem solved.

              don't have pico installed.

              Plus vi is for the kewl guys.

              Comment

              • JSA Matt
                So Fucking Banned
                • Aug 2003
                • 5464

                #8
                I have vi with a passion

                Comment

                • X37375787

                  #9
                  Originally posted by swedguy
                  of course

                  of couuuurse.

                  Comment

                  • TheSaint
                    Confirmed User
                    • Jun 2003
                    • 991

                    #10
                    up2date emacs
                    I have no signature

                    Comment

                    • notjoe
                      Confirmed User
                      • May 2002
                      • 5599

                      #11
                      Originally posted by Equinox



                      don't have pico installed.

                      Plus vi is for the kewl guys.
                      vi is for people who have time to learn 20,000 key stokes to open/edit/save a file ;)

                      Comment

                      • blackmonsters
                        Making PHP work
                        • Nov 2002
                        • 20970

                        #12
                        Oh shit! I feel stupid.
                        What is vi?
                        Free Open Source Live Aggregated Cams Script (FOSLACS)

                        Comment

                        • fuzebox
                          making it rain
                          • Oct 2003
                          • 22352

                          #13
                          And all this time I've been doing

                          y2<down> to copy 2 lines.

                          Comment

                          • X37375787

                            #14
                            Originally posted by blackmonsters
                            Oh shit! I feel stupid.
                            What is vi?

                            Unix text editor. And a pain in the ass, too.

                            Comment

                            • com
                              Confirmed User
                              • Aug 2003
                              • 4541

                              #15
                              Originally posted by Equinox



                              Unix text editor. And a pain in the ass, too.
                              it's a UNIX powertool... learn it, love it.




                              Real. Professional. Hosting.
                              .:Expect Nothing Less:.
                              320-078-843 :: www.realprohosting.com :: [email protected]

                              Comment

                              • blackmonsters
                                Making PHP work
                                • Nov 2002
                                • 20970

                                #16
                                Originally posted by Equinox



                                Unix text editor. And a pain in the ass, too.
                                Why on earth would I need that?
                                I just create a ".txt" file on my PC and do what ever I want and upload it to the server.

                                Sorry I don't get it?
                                Free Open Source Live Aggregated Cams Script (FOSLACS)

                                Comment

                                • Rorschach
                                  So Fucking Banned
                                  • Aug 2002
                                  • 5579

                                  #17
                                  Well for editing text files on a server, or for creating text files without windows new lines. If you're cruising around in the shell on your server and you want to edit a file, you'd use vim rather than downloading and uploading the whole thing. You can also launch vi from inside other programs (eg. less).

                                  Also some people run * nix on the desktop and/or prefer to code with vi/vim, you can really be very productive once you get used to it.

                                  Comment

                                  • TDJ
                                    Confirmed User
                                    • Nov 2003
                                    • 146

                                    #18
                                    vim rocks. once you get used to it, it's a hell of a better way to code than say... notepad. Very powerful.

                                    on the flip side.. emacs is pretty good too for all sorts of stuff.

                                    Comment

                                    • hibbidiji
                                      Confirmed User
                                      • Sep 2002
                                      • 208

                                      #19
                                      I bet I'm the only one here to use EE huh? and thats probably making me look reeeaaal bad... hehe I used to use pico, then did NANO (pico on pretty weak steroids) I only use vi to edit system files, not for coding etc.
                                      D
                                      ---------------

                                      Comment

                                      • sumphatpimp
                                        Confirmed User
                                        • Aug 2002
                                        • 5235

                                        #20
                                        vi commands

                                        Comment

                                        Working...