Monthly Archive for May, 2010

MS Word: 'Paste text without formatting' keyboard binding

It’s very annoying if you have to copy text from website or other places to email or you document and get the text formatted like it is on the website. Yes there is option to paste text without formatting in the menu but to get there you have to open dialog and so on and so on.

This document shows you how to create a keyboard binding for ‘Paste text without formatting’ in Microsoft Word 2000 and above. I will just copy the information here.

First we need to create the macro:

To create the macro to cut and paste without formatting

  1. Start Word.
  2. On the Tools menu, point to Macro, and then click Macros to display the Macros dialog box.
  3. In the Macro name box, type PasteUnformattedText.
  4. Make sure that All active templates and documents is displayed in the Macros in list, and then click Create. The Microsoft Visual Basic® Editor is displayed.
    Note If you need to learn about the Visual Basic Editor, see the Power User Corner column Managing Macros with the Visual Basic Editor.
  5. Directly above the End Sub statement in the PasteUnformattedText subroutine, type the following line of code:
    Selection.PasteSpecial DataType:=wdPasteText
    
  6. On the File menu, click Close and Return to Microsoft Word.

And now how to create the keyboard binding. Instead of Ctrl+V that is shown in the article, I will make my keyboard binding for the macro Ctrl+Shift+V.

To create the keyboard binding

  1. On the Tools menu, click Customize.
  2. Click the Keyboard button.
  3. Make sure the Save changes in box displays Normal.dot.
  4. In the Categories list, click Macros.
  5. In the Macros list, click PasteUnformattedText.
  6. Click in the Press new shortcut key box, press and hold the CTRL and Shift key, and then press and hold the V key at the same time. The Press new shortcut key box displays Ctrl+Shift+V.
  7. Click Assign. Click Close and then click Close again.

That’s it… now you can press Ctrl+Shift+V to paste text without formatting easily.

Eclipse: Copy Qualified Java Name

Eclipse has a nice feature to copy qualified name from a resource and this is very useful to create documentation or working with XML. For example:

Say that I need the full qualified name from class CaseFormat. What I have to do is:

  1. Click on + beside CaseFormat.java.
  2. Right click on CaseFormat (not CaseFormat.java).
  3. Select Copy Qualified Name.
  4. There you go, you can paste the full qualified name of class CaseFormat anywhere you want.

But that’s kind of a lot of steps, isn’t it?

OK… you can create a keyboard shortcut for Copy Qualified Name but still you have to expand CaseFormat.java before you can do that. If you don’t expand the *.java node what you’ll get is: ‘/guava/src/com/google/common/base/CaseFormat.java’ instead of ‘com.google.common.base.CaseFormat’.

This problem is kind of annoying and if you have to do this a lot of time, it will certainly damage your productivity.

So here is a tiny plugin to solve the problem.

com.satukubik.copyqualifiedname_1.0.0

You can download it, save it to your dropins folder, and restart Eclipse. After that a shortcut Ctrl+Shift+C is available for you to copy qualified java name without having to expand the *.java node.

For those who are curious, I’ve put the source code of the plugin here: http://code.google.com/a/eclipselabs.org/p/copyqualifiedjavaname/. Feel free to clone, suggest improvement, or report a bug.

Helvetireader

I use helvetireader for my Google Reader. It’s clean and remove unnecessary things from the website. See screenshot

1Password for Windows

Great but so far the implementation is not as good as the Mac counterpart.

BBCode

Bulletin Board Code or BBCode is a lightweight markup language used to format posts in many message boards. The available tags are usually indicated by square brackets surrounding a keyword, and they are parsed by the message board system before being translated into a markup language that web browsers understand—usually HTML or XHTML.

35 jQuery Tutorials You Must Know

Seems that jQuery is now the de-facto JavaScript library leader.

Premier League season review by Phil McNulty

I always enjoy reading a blog entry from Phil McNulty except when Manchester United lost.

Java vs C Performance

The most balanced discussion on the issue. Check it out!

Merantau – Imam Syafii

Orang berilmu dan beradab tidak akan diam di kampung halaman
Tinggalkan negerimu dan merantaulah ke negeri orang
Merantaulah, kau akan dapatkan pengganti dari kerabat dan kawan
Berlelah-lelahlah, manisnya hidup terasa setelah lelah berjuang

Aku melihat air menjadi rusak karena diam tertahan
Jika mengalir menjadi jernih, jika tidak, kan keruh menggenang

Singa jika tak tinggalkan sarang tak akan dapat mangsa
Anak panah jika tak tinggalkan busur tidak akan kena sasaran

Jika matahari di orbitnya tidak bergerak dan terus diam
Tentu manusia bosan padanya dan enggan memandang

Bijih emas bagaikan tanah biasa sebelum digali dari tambang
Kayu gaharu tak ubahnya seperti kayu biasa
Jika didalam hutan

Author : Imam Syafii
(Dikutip dari novel Negeri 5 Menara. By: Ahmad Fuadi)

Gravatar for Mac’s Address Book

Nice idea. With this app you can semi-automatically insert a picture for your contacts using their Gravatar.