geekological

metonym.in

Your friend for GRE words and Vocabulary. Find here

Monthly Archives: May 2012

vim cheat sheet

By |May 5th, 2012|

Vim Commands Cheat Sheet

How to Exit

:q[uit]
Quit Vim. This fails when changes have been made.

:q[uit]!
Quit without writing.

:cq[uit]
Quit always, without writing.

:wq
Write the current file and exit.

:wq!
Write the current file and exit always.

:wq {file}
Write to {file}. Exit if not editing the last

:wq! {file}
Write to {file} and exit always.

:[range]wq[!]
[file] Same as above, but only write the lines in [range].

ZZ
Write current file, if modified, and exit.

ZQ
Quit current file and exit (same as “:q!”).

[…]

.vimrc

By |May 5th, 2012|

This is the main configuration file for Vim. It exists in two versions—global and personal.
The global vimrc file is placed in the folder where all your Vim system files are installed. You can find out the location of this folder by opening Vim and executing the following command in normal mode:
:echo $VIM
Examples could be:
Linux: /usr/share/vim/vimrc

The […]

Auto completion with known words in vim

By |May 5th, 2012|

Almost no matter what you are writing, you will eventually write the same words over and over again. In Vim, you can simply type in the first couple of letters of the word and then press Ctrl-n.
Example:
You want to write the sentence:

“I have beautiful flowers in my flower garden.”

Since you have no text besides this […]

How to install Eclipse 3.7 on Ubuntu 11.04

By |May 5th, 2012|

The Eclipse packages in Ubuntu are are very out of date. The latest version in the Ubuntu repos is 3.5.2 where as the latest version of Eclipse is 3.7.

I am posting the procedure to install Eclipse.

1) Download Eclipse from
http://www.eclipse.org/downloads/
2) Extract it
tar xzf eclipse-jee-indigo-SR2-linux-gtk.tar.gz
3) Move to /opt/ folder
mv eclipse /opt/
cd /opt/
sudo chown -R root:root eclipse
sudo chmod […]