Thursday, 26 April 2012

Google Drive and vim - two very good friends

This is a day I feel I have been waiting for ever since I got my first computer.

I managed to seamlessly share a text document between Windows XP and Mac OS X with vim using Google Drive. And it even works offline.

Once you have installed Google Drive, the procedure is very, very simple.

First assume that you sit in a bus or airplane without internet.
  1. On XP, open Cygwin, or whatever environment you use to run vim.
  2. Navigate to the Google Drive folder.
  3. Create a new document using vim.
  4. Save and close the document.
  5. When you get somewhere with internet just wake up your XP laptop, and wait for the synchronisation.
  6. While you wait, take out your Mac.
  7. Access the Mac's Google Drive folder using Terminal. The document is there.
  8. Open the document in vim and enjoy.
I should perhaps add that I use vim because it is quick and simple and has no disturbing elements. You should be able to use Notepad or Ultraedit and TextEdit or TextWrangler and do exactly the same thing.

...

Update 18 October 2018: There are now many more options, of course. You can use any Windows version with cygwin or any other environment with vim. You can use any kind of shared drive, like iCloud or OneDrive equally well as Google Drive. Life is much easier than it was half a dozen years ago.

How do I type in UK English using a US English keyboard in MS Word 2010?

28 April 2012. Updated with a solution to the rant in italics below.

To solve a problem in MS Word, the obvious solution is to leave MS Word. In Windows XP, you go to the task bar > Settings > Control Panel > Regional and Language Options. Inside that control panel you click on the tab Languages > Details, and you come to the "Text Services and Input Languages" control panel.

When you Add English (United Kingdom) as Input Language, by default, XP installs the "Keyboard layout" United Kingdom. However, one can activate the choice of keyboard by clicking on the checkbox next to it. Then one needs to manually choose "US" as keyboard layout. To make it appear as default in MS Word and other applications, select the combination "English (United Kingdom) - US" as "Default input language".

I still do not understand why Word insists on changing language with layout, but it is admittedly not causing much of a problem any more.



....
I have no idea.


Usually, I try to come with solutions to problems in my blogs, and occasionally whining complaints. Today is the time for a desperate question.


I'm not American. Neither am I UKian, but I am used to UK English, and I want to go on typing UK English, as I have been doing the last forty years of my life.

My Windows XP laptop has a US keyboard. Every time I type in Microsoft Word 2010, the computer awards me a US green card or citizenship and the spelling turns into US English.


I have set UK English to default language of MS Office. MS Word proudly displays that language as default, when I start a new document. However, as soon as I actually type, it switches to US English.


I have tried the UK English keyboard layout, and then the text stays UK English. However, there are plenty of keys that do not correspond to the physical keyboard. Besides, I suspect one key is missing, as I cannot find backslash anywhere with a soft UK English keyboard layout.


Dear mr. Microsoft,


Am I really the only person in the world who wants to type UK English with a US keyboard? Is it really an unforgivable sin to mix the twain? If it is, can you not grant me absolution in secret, and let me, just me, type UK English with my US keyboard? It can stay between us. I could promise not to tell anyone else that you granted me this generous favour. Or favor.