I mentioned in a tweet recently that I’ve been using some form of Vi for about twenty years. It all started in college where we had highly advanced green screen monitors attached to a large Unix box. I can’t remember what Unix it was ran on that machine (it may have been UnixWare) but it was a far cry from the nice GNU interface we’re used to on modern Unix systems. Vim certainly was not a part of the default install.
However, Vim has been my editor of choice all my working life. All this time I’ve known I’m only scratching the surface of it’s functionality but only recently has it become clear how much. I can navigate through it with ease, open numerous files in separate splits, search/replace and of course vimdiff was partly responsible for every single WordPress MU release as I used it to pull over changes from WordPress.
So, thanks to /r/vim I discovered the following today:
- /r/vim_magic is indeed full of magic.
- More Instantly Better Vim is a great talk on some insane things to do with Vim.
- I had no idea Vim had tabs but I still prefer splits.
- snipMate.vim is a snippet plugin for Vim based on the snippets in TextMate. Around the turn of the century I had messed with abbreviations but this is way better. Found that here where there’s plenty more tips to read.
- Coming home to Vim is the story of the return of a TextMate user to Vim. Why didn’t I know about daX and diX?
- Since I use split files, I’m always tapping CTRL-w w or CTRL-w UP/DOWN to switch between splits. It never occurred to me that I could map the TAB like this to switch split files. TAB switches to the next split file, SHIFT-TAB hops back.
map <Tab> <C-W>w
map <S-Tab> <C-W>p
- I am tentatively mapping ; to : with
nnoremap ; : but I probably won’t use it. My fingers are too used to LSHIFT-; to stop now. I’ve never used the ; command, I had to look it up to see what it did!
From my tweet comes some productivity tips. I have never used the Leader key. The shame, the shame!
So much to learn. I’ll probably leave comments on this post linking to all the bits and pieces I find. Yes, I’m excited about a bloody text editor. Haha!
My son is going to love this when he sees this. Mind blown I’m sure!
I tried to install fdupes this morning on my Ubuntu Linux server but the install bombed out with this error, followed by a string of other warnings before dpkg rolled back everything:
gzip: stdout: No space left on device
What? I’d installed a 500GB drive in that machine recently. It was /boot/. A quick look in there revealed a number of old Linux kernels but luckily there’s an easy way to get rid of them.
This showed me a list of all my installed kernels, and “uname” told me the name of the current kernel which I shouldn’t remove.
dpkg -l linux-image-\* | grep ^ii
Removing them was as easy as this:
apt-get purge linux-image-3.8.0-29-generic linux-image-3.8.0-31-generic linux-image-3.8.0-32-generic linux-image-3.8.0-33-generic linux-image-3.8.0-34-generic linux-image-3.8.0-35-generic linux-image-3.8.0-36-generic
When I finally installed fdupes it kindly removed all the kernel headers saving me a further 505MB of space. I’m pretty sure this is the first time /boot has filled up on me.
fdupes is pretty nice too. It finds duplicate files by comparing file sizes first and then does MD5 checks.
I should probably close some browser tabs. I’ve tried various tab extensions, using Pocket, or even copying URLs into a text file but still I leave the same tabs open for days on end until Chrome crashes and I forget to recover them and, BOOM, they’re gone and I don’t care.
Rinse and repeat.
Happy 25th birthday WWW!
In a few hours time Neil deGrasse Tyson will present the new series of Cosmos. We won’t see it in this part of the world for another week unfortunately. I never saw the original series and only know Carl Sagan by reputation as the only time I’ve heard him speak at length was in this 1996 Science Friday interview they rebroadcast in December. I still have it on my phone despite the fact I listened to it several weeks ago. It’s a great interview, you should listen to it too.
Thanks to Reddit here’s a short interview with a younger Neil deGrasse Tyson where he explains the influence Carl Sagan had on him and tells of first meeting him. It’s a lovely and charming story.
It must be something about the slightly warmer air in Spring time because the last time I looked at virtual desktops for Windows was almost exactly two years ago.
Back then I tried an app called Desktops and mentioned VirtuaWin in passing but I honestly don’t remember why I stopped using Desktops and barely remember using it at all.
I installed VirtuaWin last Friday and I’ve been using it over the weekend and it’s a fine replacement for the same Linux functionality I used for many years. I have browsers in desktop 1, MTPuTTy in desktop 2 and I’m experimenting with xchat and Skype in desktop 3 so if you ping me on either of those and I don’t react it’s probably because the status bar icon doesn’t flash.
There’s also Dexpot but I’m in no hurry to try it just yet.
tl; dr: Knox still bothering you after installing CF Auto Root? Install SuperSU from the Play Store to disable it!
Knox is a security tool that came in an update for the Galaxy S4 that helps protect your phone from any app doing nasty stuff to it. Unfortunately it makes life difficult for anyone who wants to root their phone to use useful apps like Greenify, Titanium Backup or any of the apps out there that need full control of the phone.
I had rooted my phone a good while ago but when I flashed Android 4.3 on it root functionality was removed. I thought CF Auto Root would fix it but it didn’t. Any time an app tried to gain root privileges a security warning would popup saying,
An application attempted to access system on your device without authorisation. This attempt has been blocked. Changing your security level to normal may solve this problem. Deleting applications obtained from unauthorised sources may improve security.
Oddly enough, Greenify worked still, and I think Adaway worked too. The oddest thing was that they worked without the usual root elevation message displaying. A later firmware update stopped those apps working as well. I think it’s SELinux that displayed that message as Knox was never actually installed.
I gave up in frustration but this evening I tried again. CF Auto Root has been updated, I flashed it and rebooted. Again the security warning showed, and there was no sign of SuperSU. Eventually I found that someone recommended installing SuperSU from the Play Store again and let it detect Knox and remove it. I tried that and, hey presto! It worked!
Now, my phone is rooted, Greenify works, and I’ve backed up a few key apps. I’m waiting on a larger capacity SD card to do a nandroid backup and then I may look at installing a KitKat ROM. I know that KitKat is rolling out but I don’t like what Google/Samsung have done with SD card access and I’m hoping ROMs won’t follow suit. Any recommendations?
I have an old but capable Samsung Galaxy S2 that has remained unused for several months but when my Nexus 7 tablet was stolen (along with most of my camera equipment, but not my Canon 6D fortunately) a week ago I wanted another device my son could use.
One of the requirements for any such device is that only I install new apps or games. I already have a PIN on purchases but there’s so much spam on the Play Store that I suspect at least some of those Minecraft clones are up to no good. On the Nexus 7 I could use a restricted account and choose what apps or games my son could run but my S2 was running an old version of Cyanogenmod and it looks like CM isn’t supporting it any more.
NeatROM for the S2 to the rescue! It’s a KitKat 4.4.2 based ROM for the Galaxy S2 and it was a fairly painless install. You’ll need to flash a KitKat compatible CWM Recovery first, then the ROM and then Google Apps. All those things are listed on the page above.
It was then I realised and remembered that the multiuser support in Android 4.2+ is for tablets only. Luckily the code is already there but it’s switched off and someone else has already taken care of it with the Modaco toolkit for Xposed. Unfortunately after installing this the first time the phone wouldn’t boot so I had to start from scratch again but the second time it worked fine. I enabled multiuser support in Modaco and the Users menu appeared in Settings!
Unfortunately I needed to login to the Amazon Appstore in the restricted account, but a PIN should stop any accidental purchases.
The S2 is showing it’s age. I suspect the flash memory is starting to wear down. When I tried to install multiple apps at one time the Play store stopped downloading them and I had to stop the download. The original battery is rubbish but a larger replacement lasts a few hours.
It plays a mean game of Angry Birds however, which is all my son cares about now!
I noticed a Commodore 64 screen last night in the game Saints Row 4. The keyboard is definitely not a C64 one, neither is it a C128 but I’ll forgive that oversight.
There are various retro parts of the game, like a 2D side scrolling beat-em-up to rescue one of the characters but this was in a fairly mundane mission where you have to shoot lights, that’s all I’ll say. Watch out for it!
Some good news if you’re drinking a diet soda and people have warned you it’s poisonous.
Everything in moderation of course. I’d say don’t drink sodas (diet or otherwise) at all on a regular basis. (via Reddit)