What makes you happy ?

"Karma man, just remember Karma. Treat things nice and nice things happen to you." © Claire

Vim – a first

12:00 Thursday 15 Dec 05

I just edited my first ever file using Vim. Not a lot I know, but I didn’t break anything in the process. Worth noting :) Next up is deleting stuff. rm * or something similar I believe … (I forgot to add – I mean command line stuff, not editing stuff)

Edit: How damn cool is rm -rf ? Bloody marvellous stuff, saves years of ftp waiting for deleting stuff. Now.. what next ?

More: Tech
  1. Gregory
    1
    • *twitch* Vim! *twitch*

      The horror… the horror. Vim is pretty much my entire argument for a GUI ;)

      I like the Unix commandline. SSH access to my host is invaluable, but I’ll be damned if I edit anything in VIM. I’ll just SFTP into my account with WinSCP and edit it on the server using my favourite windows gui texteditor (atm Editpad). It was slightly easier on a mac (Fugu and SubEthaEdit) but still… screw a bunch of Vim.

      but yeah.. rm -rf, really useful.

    14:22 Thursday 15 Dec 05


  2. Justin Moore
    2
    • Vim and rm -rf are just gateway drugs to Linux. I really hope you get your wireless card issues resolved at some point so you can start enjoying ALL of the powerful stuff that *nix has to offer.

    14:24 Thursday 15 Dec 05


  3. pete
    3
    • you might want to try emacs / pico / whatever other editors are on your system, but it’s probably too late (I stumbled on vim first and have never been able to get on with another equivalent since ;)

      so … you’re discovering the shell, eh? Found out about the Real Ultimate Power(tm) of pipes yet? Read on …

      http://www.cf.ac.uk/psych/CullingJ/pipes.html
      http://www.december.com/unix/tutor/pipesfilters.html

      Here’s a quick example … you might not know the command “less” which is just a little ‘output pager’ thing. Less lets you page through a large amount of text. You can use less on a text file to view it:

      less myfile.txt

      And, if the file contents are long enough, less will let you page up and down. Now consider this:

      ls myDirWithHundredsOfFiles

      This will list the directory contents, but there are hundreds of them and they whizz by too fast! You could limit ls’s output incrementally and repeat the command which would effectively let you see all the files (eventually):

      ls -n 20 myDirWithHundredsOfFiles
      ls -n 40 myDirWithHundredsOfFiles
      ls -n 60 myDirWithHundredsOfFiles
      ….

      But that’s crap, right? How about we *combine* the ls command with less? We use a pipe for that:

      ls myDirWithHundredsOfFiles | less

      Now less will happily page back and forward through the output from the ls command (rather than the content of a text file as in the original example).

      Hope that helps!

      Pete

      (ps – “less” is so called because there was an older version called “more” …. it’s a joke, see?)

    14:48 Thursday 15 Dec 05


  4. Mark
    4
    • Justin – the first livecd that has the new broadcom code in it will certainly have me there.

      Pete – complex…. but I need to play and Gregory – I’ve got pspad around somewhere and that can edit directly so I ought to try that I suppose.

      Oh – on the main index page, refresh, then type drunk

      :)

    15:55 Thursday 15 Dec 05


  5. shorty114
    5
    • @Gregory: Try GVim (on vim.org I believe) – not as GUI as SubEthaEdit or the like, but an improvement.

      Whatever you do, don’t switch to Emacs…

    18:16 Saturday 17 Dec 05


θ α λ κ

Think. Then type.

*     *    

Comment RSS / Trackback




|| Home ||

FreshlyPressed - Feed - Privacy - 2.9 - 3,204 - 10,442 - 0.261