Buddha

Buddha
Seek

Tuesday, June 24, 2008

Syntax highlighting on VIM

Hi,

Well wont you love to have the syntax/color highlighted in VI editor. Be it a C program or HTML, vim is a classy editor and of course we would love to have syntax highlighted on it.

Aint it ??

How to go ahead and achieve it.

The easiest way - in vim press :

the type 'syntax on'

To do it everytime the editor comes up automatically.

Search for a file called vimrc.
Generally it would be somewhere like /etc/vim/vimrc

Open the file and uncomment the line

"syntax on
to
syntax on [remove whatever is before that]

Play around, make changes, then next time vim is started, syntax is highlighted.

Follow: http://www.ph.unimelb.edu.au/~ssk/vim/syntax.html for actual documentation.


Chao.

Monday, June 2, 2008

How to export X display using Cygwin

Hi.
For most of those who would want to connect from a Windows machine on to a Linux/Solaris/Unix server and have the display imported, here is the method.

1. Download and install cygwin on windows.
2. After the installation is complete, run a cygwin bash shell.
3. type the following commands there

x -multiwindow&
export DISPLAY=[IP of ur machine]:0.0 [for me it was export DISPLAY=10.114.55.119:0.0]
xhost +


4. Telnet to the remote machine and set the DISPLAY variable with your machine's IP
export DISPLAY=[IP of local machine]:0.0

5. start any application in the background.
firefox&