Profile cover photo
Profile photo
Brandon Casey
Brandon's posts

Post has attachment

til: How to use vim as an editor (as opposed to an archive manager)

Add these lines to your .vimrc file:

   let g:loaded_tarPlugin = 1
   let g:loaded_tar = 1
   let g:loaded_gzip = 1
   let g:loaded_zipPlugin = 1
   let g:loaded_zip = 1

Voila!  Sanity restored.  Vim will now open the files that you tell it to open, populate the editor buffer with their contents and allow you to edit them.  i.e. it does what an editor is supposed to do.

This has bitten me many times in the past and usually I've just worked around it.  Today it has consumed my entire morning and I've figured out how to fix it for good.  Vim has become "smart" for questionable definitions of the word "smart".  These days when you supply the name of a file that ends in '.tar' or 'tar.gz' to vim, it runs it through tar and/or gzip to extract the contents and provides a navigable tree representation like any decent archive manager will do.  Except vim is supposed to be an editor, not an archive manager.

Just now I tried to download a tar file with the curl command line tool.  Then I tried to extract the contents of the tar file, but tar produced an error claiming that the file was not a tar archive.  I figured, "oh, the download must have failed and curl probably wrote an error message to the downloaded file", so I tried to open it with vim, except vim noticed that the name of the file ended in '.tar.gz' and instead of displaying the file contents to me, piped the contents through tar and I got an error message from gzip and tar in my editor buffer about how the file was "not in gzip format" and it "does not look like a tar archive".  Brilliant.  Thanks vim.  That's not helpful at all.

The vimrc settings above will disable the tar, gzip, and zip plugins so that vim will not try to treat them specially.  When I supply a filename to vim, I want to see the bytes on disk thankyouverymuch.

Post has attachment
And the 3D printed version...
Animated Photo

Post has attachment
I recently discovered OpenSCAD  It bills itself as "The Programmers Solid 3D CAD Modeller".  It's pretty cool.  I've been playing with it this week.
Animated Photo

Post has attachment
What I've been working on...

Q: Is 4294967296 bytes of memory enough to run +Google Chrome?
A: No.
Q: Why do all browsers follow the same path into excessive, exasperating, exhaustive, memory consumption?
A: Hellifino.

I've been a huge supporter of Chrome, especially the security model and native client, but does it really need to use all of system memory? I think not.

#bloat #chrome #FreeAsInMemory

Post has attachment
Clock Skew

Post has attachment
Nice.  "The Last of Us" soundtrack is on Amazon Prime Music.

Post has attachment
Great demonstration of how computers add numbers (aka "do work") by using dominoes to build logic gates.  Excellent video as always from this group.  Also check out "Matt's Big Domino Computer" in the links.

Post has shared content
Git won Linux Magazine's Linux New Media Award in the category "Outstanding Contribution to Open Source/Linux/Free Software".
Wait while more posts are being loaded