How to make "Paste Without Formatting" the default paste operation in Thunderbird

First of all, you'll have to install the Keyconfig extension. It allows one to override some existing keyboard shortcuts or define new shortcuts both in Firefox and in Thunderbird. The Thunderbird command name for the "Edit / Paste Without Formatting" operation is cmd_pasteNoFormatting. So all you have to do is to assign a new shortcut to the default "Paste" key binding and assign the Ctrl+V to this cmd_pasteNoFormatting command. I've done it and it worked for me on Mac OS X and with TB 2.0.0.0.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

THANK YOU

Thank you!

exactly what I had to do was

exactly what I had to do was first change the normal Paste key to eg. shift+ctrl+v and then create new key, give name

goDoCommand('cmd_pasteNoFormatting');

and code

goDoCommand('cmd_pasteNoFormatting');

and apply new CTRL+V key

then it worked Smile

THANKS!

Re: exactly what I had to do was

You're right. I had to reassign the normal paste to a different shortcut too, just forgot to mention it here. Thanks for the correction.

Works like a charm. One

Works like a charm.

One thing though is when I set Ctrl+Shift+v to be 'Paste', it uses the original 'Paste as Quote'. I don't see the key setting for paste as quote anywhere in keyconfig.

Re: works like a charm

The trick is to use the combobox at the top of Keyconfig's window. It lists all the currently open windows belonging to Thunderbird. By default you've only one TB window, plus the Keyconfig window, which means you'll have two entries in the combobox (for me it's "Inbox for myaddress@example.com" and "Keyconfig"). So to see the shortcuts available in the Compose window, start Keyconfig and open a new message composition window in the main window of TB. Now you'll have a new entry in Keyconfig's combobox named something like "Compose: (no subject)" (the label of the entry is the title of the given window). If you don't find here the command you're looking for (eg. "Paste Without Formatting"), then click the "Add a new key" button, specify a name for the new keyboard shortcut and the code to be run, when the given key is pressed in the selected window. The code to execute an already defined action (command) in TB is:
goDoCommand('cmd_nameofthecommand');
Here're the command names for the various paste operations:
  • Paste: cmd_paste
  • Paste Without Formatting: cmd_pasteNoFormatting
  • Paste As Quotation: cmd_pasteQuote
To find the command name for an arbitrary, predefined action (eg. an already existing menu item in TB), look into the JAR files in TB's chrome subdirectory. These are actually ZIP files so a simple unzip can extract their contents. Eg. to find the command for the "Paste As Quotation" command, you've to search all these JARs for the "Paste As Quotation" string. You'll find a number of hits, but the relevant one is in the locale definition JAR, en-US.jar in my case (since I use the English version of Thunderbird). Of course, if you use TB in some other language, then you'll have to look into the locale JAR of that language and look for the menuitem's label as you see it in TB.

Back to the example ... the translated (ie. English) version of the "Paste As Quotation" label is in chrome/en-US.jar/locale/en-US/editor/editorOverlay.dtd:
<!ENTITY pasteAsQuotationCmd.label "Paste As Quotation">

This means that the label ID for the command is pasteAsQuotationCmd. Now search for the label ID in the other JARs of the chrome directory and you'll find that it's in chrome/comm.jar/content/editor/editorOverlay.xul (what a surprise Smile ). Look into that file and you'll find this command definition:
<command id="cmd_pasteQuote" oncommand="goDoCommand('cmd_pasteQuote')" label="&pasteAsQuotationCmd.label;"/>

The relevant part of this is the goDoCommand('cmd_pasteQuote') attribute since this defines the code that is run, when the command is triggered.

Is it possible to re-map

Is it possible to re-map Shift+Ins to do "Paste without formatting" using keyconfig?

Thank you.

Re: Is it possible to re-map

I don't know. I haven't been using the Keyconfig extension since the Paste Without Formatting menuitem got it's own keyboard shortcut in TB. Did you try it?

No need for a plug-in!

In the newer versions of Thunderbird, CTRL+SHIFT+V pastes without formatting.

I know this is an old thread, but this is the first result for a google search of this issue and I wanted people to know you don't need to install any plugins to do this.

Re: No need for a plug-in!

Thanks for the feedback! I checked and you're right. You don't even need the latest (5.x) version. The shortcut is already available in 3.1.x (maybe 3.x too) by default (ie. without the Keyconfig extension).