How to Close Pidgin Chat Windows with the Escape Key

Pidgin (formerly known as Gaim) is a free, multi-protocol instant messaging application for Windows, Mac, and Linux.  Pidgin is highly customizable and supports popular instant messaging networks like Google Talk, MSN/Windows Live Messenger, AIM, Yahoo! Chat, and can connect to services like Facebook Chat through plugins (or directly through the XMPP messaging protocol).

In recent versions of Pidgin, the developers changed the default “close chat window” hotkey from the Escape key to the combination CTRL + W.  While I understand their reasons for doing this (many desktop applications have standardized CTRL + W as the ubiquitous “Close Window” hotkey), I simply can’t break the habit of closing IM windows with Escape.

Here’s how to change Pidgin’s configuration so Escape closes the IM window instead of CTRL + W.

Update: Reader Miguel submitted a much easier way to use the Escape key to close IM windows. Thanks!

Step 1: In Pidgin, go to Tools –> Preferences.

Step 2: In the Interface tab, enable the checkbox for “Close conversations with the escape key”.

That’s it! This change will make Pidgin recognize Escape as the hotkey to close IM windows. Commence celebration.

The other (more difficult) way to use the Escape key to close IM window

Step 1: Close Pidgin.

Step 2: Windows XP: Navigate to the following directory on your computer (where username is the user you’re logged in as):

C:\Documents and Settings\username\Application Data\.purple\

Windows Vista or Windows 7: Navigate to the following directory on your computer (where username is the user you’re logged in as):


Linux/UNIX: Navigate to the following directory:


Step 3: Locate the file called accels and open it with Notepad (or a similar text editor, I prefer Notepad++).


Step 4: Find the line that contains the following code:

; (gtk_accel_path “

/Conversation/Close” “w”)


Delete the semicolon (;) and change the line to the following code:

(gtk_accel_path “

/Conversation/Close” “Escape”)


The Ultimate .vimrc Configuration File for the Vim Text Editor

Vim is a versatile and powerful text editor for command-line environments in Linux/UNIX systems.  Vim is free, open source, and is available on many different platforms, but it does have some quirks out of the box.  If you’re comfortable working in a regular text editor you might find yourself lost, but in this guide I’ll show you how to supercharge Vim with a simple configuration file.

Besides the idiosyncrasies of being a non-GUI’d text editor, there were a couple things I wasn’t wild about when using a fresh, unmodified version of Vim:

  • On some computers, the arrow keys don’t always navigate. They might instead insert random characters into your file (like the up and down arrows insert the letters A and B instead of navigating).
  • Syntax highlighting is not on by default.
  • Smart indenting is not enabled by default.
  • Line numbers are not enabled by default.
  • The Delete key does not function normally.
  • No mouse functionality.

Vim’s settings are stored in a configuration file called .vimrc which is located in your profile’s home directory.  You can add dozens of excellent features to Vim by making some very simple changes in this file  – only one problem, you have to do a lot of reading to figure out which settings to enable.

A co-worker of mine recently gave me bartered with me for an excellent .vimrc file, and I enjoyed it so much that I decided to post it here.  He notes that he originally found it on the internet and made changes to it, so if you want to take any credit for this wonderful configuration just let me know in the comments.

Modifying Vim’s Settings

To edit (or create) a .vimrc file, just go to your command-line environment and use a text editor to open ~/.vimrc (the ~/ syntax denotes your home directory).  If you already have Vim installed, you can use the following command:

vim ~/.vimrc

After that, copy and paste the following code into the file (you might need to press Shift + Insert to paste), then write the changes to file with the command :wq).  These changes will immediately take effect after you’ve re-opened Vim.

If you’re wondering what any of these settings do, check out the comments after each single quotation mark (“).  Single quotation marks in the .vimrc file are viewed as comment syntax, meaning they will be ignored by Vim.

set nocompatible "This fixes the problem where arrow keys do not function properly on some systems.
syntax on  "Enables syntax highlighting for programming languages
set mouse=a  "Allows you to click around the text editor with your mouse to move the cursor
set showmatch "Highlights matching brackets in programming languages
set autoindent  "If you're indented, new lines will also be indented
set smartindent  "Automatically indents lines after opening a bracket in programming languages
set backspace=2  "This makes the backspace key function like it does in other programs.
set tabstop=4  "How much space Vim gives to a tab
set number  "Enables line numbering
set smarttab  "Improves tabbing
set shiftwidth=4  "Assists code formatting
colorscheme darkblue  "Changes the color scheme. Change this to your liking. Lookin /usr/share/vim/vim61/colors/ for options.
"setlocal spell  "Enables spell checking (CURRENTLY DISABLED because it's kinda annoying). Make sure to uncomment the next line if you use this.
"set spellfile=~/.vimwords.add  "The location of the spellcheck dictionary. Uncomment this line if you uncomment the previous line.
set foldmethod=manual  "Lets you hide sections of code
"--- The following commands make the navigation keys work like standard editors
imap   gj
imap   gk
nmap   gj
nmap   gk
"--- Ends navigation commands
"--- The following adds a sweet menu, press F4 to use it.
source $VIMRUNTIME/menu.vim
set wildmenu
set cpo-=<
set wcm=
map  :emenu 
"--- End sweet menu

With these changes, you should be dominating source code with Vim in no time.  And I have no doubt that it will impress the ladies, too.

Image courtesy: Jason Ryan