Slashdot Mirror


(Useful) Stupid Vim Tricks?

haroldag writes "I thoroughly enjoyed the recent post about Unix tricks, so I ask Slashdot vim users, what's out there? :Sex, :b#, marks, ctags. Any tricks worth sharing?"

27 of 702 comments (clear)

  1. best one ever by shawn(at)fsu · · Score: 4, Funny

    :r! emacs /I partly kid I like Vi

    --
    500 dollar reward for tip(s) leading to the arrest of the person(s) who stole my sig.
    1. Re:best one ever by Anonymous Coward · · Score: 2, Funny

      /bin/bash: emacs: command not found

    2. Re:best one ever by rpresser · · Score: 4, Funny

      $ sudo bash
      Password:
      # test -f /bin/emacs  && mv /bin/emacs /bin/emacs.NEVER
      # cat <<EOF >/bin/emacs
      #!/bin/bash
      echo emacs: command not found
      EOF
      # exit
      $ logout

  2. Re::Sex by Anonymous Coward · · Score: 5, Funny

    You're asking on the wrong site. No one on Slashdot has ever tried it.

  3. Re::Sex by TrekkieTechie · · Score: 5, Funny

    I'll tell you when you're older.

  4. very useful (especially for noobs) by gEvil+(beta) · · Score: 5, Funny

    :q

    --
    This guy's the limit!
    1. Re:very useful (especially for noobs) by Anonymous Coward · · Score: 4, Funny

      surely:

      :q!
      nano

  5. Re:Just using VIM by jDeepbeep · · Score: 3, Funny

    is itself a stupid trick. Emacs sucks too. Please welcome you to 21 century - use textedit!

    No thank you. edlin works just great for me.

    --
    Reply to That ||
  6. WTF?? by monkeySauce · · Score: 5, Funny

    I typed :Sex and it opened up a HUGE list of folders choc full of porn!

    1. Re:WTF?? by snspdaarf · · Score: 4, Funny

      Congratulations! You found the Easter egg!

      --
      Why, without your clothes, you're naked, Miss Dudley!
  7. Stupid vi tricks? by argent · · Score: 2, Funny

    VIM is a "stupid vi trick".

    Every time I update OS X no I have to dike it out and put the REAL "vi" back.

    1. Re:Stupid vi tricks? by Anonymous Coward · · Score: 5, Funny

      Stupid vi tricks? (Score:2)
      by argent (18001)

      I believe you and your fancy VIM are on this man's lawn.

  8. Re:Just using VIM by eln · · Score: 5, Funny

    Young whippersnappers. When I was "at a young age", it was called vi, and it didn't have any of this fruity syntax highlighting, and if you wanted to navigate around a document you had to use h,j,k,l, not those hand-holding arrow keys.

    Remember the old dig at emacs, "Eight Megs and Constantly Swapping?" Well back then, an 8 MB program actually did mean constant swapping!

    I've been in this business for too damn long.

  9. Re:Just using VIM by careysb · · Score: 2, Funny

    When I was your age I wrote thousands of lines of C code using EDLIN. (P.s. this was on a *nix box not DOS) (P.p.s Also walked to school 5 miles, up-hill, barefoot, in the snow, both ways)

  10. Re:Just using VIM by Anonymous Coward · · Score: 5, Funny

    Not really a vim trick, but I always liked to create a file in the / directory named README. The file just contained one line: "ERROR: can not open file README" When someone cats it, they get the error message. Pretty cute until they vi it and figure it out.

  11. I think I see a pattern in these stories by Xeth · · Score: 2, Funny

    ...and I've already gotten through half of my 20-page "(Useful) Stupid Emacs Tricks" post.

    --
    If your theory is different from practice, then your theory is wrong.
  12. Re::Sex by pimpimpim · · Score: 5, Funny
    it give you a file exploring pane above the buffer you are currently using.

    If only my parents had told me earlier.

    --
    molmod.com - computing tips from a molecular modeling
  13. Re:Just using VIM by Anonymous Coward · · Score: 1, Funny

    When I was your age I wrote thousands of lines of C code using EDLIN. (P.s. this was on a *nix box not DOS) (P.p.s Also walked to school 5 miles, up-hill, barefoot, in the snow, both ways)

    That's nothing. When I was half your age I wrote code over a dial up connection without a modem. Made the tones with my voice! Mind you we lived in a cardboard box at the time, in the middle of the road.

  14. Re:Just using VIM by Anonymous Coward · · Score: 1, Funny

    When I was your age I wrote thousands of lines of C code using EDLIN. (P.s. this was on a *nix box not DOS) (P.p.s Also walked to school 5 miles, up-hill, barefoot, in the snow, both ways)

    That's nothing. When I was half your age I wrote code over a dial up connection without a modem. Made the tones with my voice! Mind you we lived in a cardboard box at the time, in the middle of the road.

    We used to DREAM of even having a phone to make tones with. We had to tap out our code with a telegraph machine, in binary, from memory. And as there were twelve of us living in OUR cardboard box, we had to take turns and STILL get eight hours of work done in a day.

  15. Re:Just using VIM by michaelamdavies · · Score: 2, Funny

    Eeee, I used to dream of living in a hole in't ground. We used to live at bottom of lake, hand coding assembly language in hex, rotating bits with a hand crank and communicating it using signal flags or semaphore. And then sysadmins and punch card operators would come and chop us into little bits with paper tape readers and dance on our line printer reams. And you tell young people this today, and they just don't believe you

  16. Re::Sex by Randle_Revar · · Score: 2, Funny

    support :sex education!

  17. Re:Just using VIM by Anonymous Coward · · Score: 5, Funny

    How else am I supposed to get anything done on Windows?

  18. Re:Just using VIM by geminidomino · · Score: 2, Funny

    * leaves himself a note to get cygwin installed on the home system

    How can I install that on Ubuntu?

  19. Re:Just using VIM by rrohbeck · · Score: 4, Funny

    * leaves himself a note to get cygwin installed on the home system

    How can I install that on Ubuntu?

    VMware.

  20. Re:Just using VIM by ppc_digger · · Score: 4, Funny

    He said an editor, not an operating system.

    --
    Of all major operating systems, UNIX is the only one originally meant for gaming.
  21. Re:Just using VIM by DG · · Score: 2, Funny

    Young whippersnapper.

    You think *you* had it tough? We had to figure out all the fundamental constants of the universe and then tough off the Big Bang and wait for limbs and blood to **evolve** before we could paint on the cave walls.

    You "we inherited an inhabited universe" guys had it *so* easy compared to us. Did *you* ever work out the ideal value of Plank's Constant by trial end error? I don't think so.

    Meh. Kids today.

    DG

    --
    Want to learn about race cars? Read my Book
  22. Re:Replacement by Anonymous Coward · · Score: 1, Funny

    Young fools. You don't anything know about sed, do you? You can use sed "s/foo/bar/g" < file in another session of Screen. Of course, sed is a far too arcane tool for people who like to play music in an editor. Crappy music, by the way.