<< James Gosling, Open Source, Future of Java, ... | Home | PDF Generation From OpenOffice >>

Cygwin Notes

The D programming language arrived at my Cygwin installation today. You just change all your c's to d's :) :

[weiqi@gao] $ cat foo.d
int main()
{
    printf("hello, world.\n");
}
[weiqi@gao] $ gdc -o foo foo.d
[weiqi@gao] $ ./foo
hello, world

The Windows clipboard can be accessed as /dev/clipboard from the bash command line. Now I can do

[weiqi@gao] $ head -1 ChangeLog > /dev/clipboard

to put the first line of the ChangeLog into the clipboard, and !!cat /dev/clipboard in Vim to paste it into the CVS log:

 
CVS: ----------------------------------------------------------------------
CVS: Enter Log.  Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in ...
~
~
~
:.!cat /dev/clipboard

The ascii command prints the ASCII table to stdout, including the beep.


Learned a few more tricks in Vim:

  • The  *  command finds and highlights the next instance of the word under the cursor.
  • The  %  command finds matching parenthesis, brackets and braces. It also finds matching #if/#else/#elseif/#endif's in C source files.
  • Ctrl-n  is the word completion command. It cycles through all possible completions. It knows about symbols from #included header files.

Did I say "header files"?

Tags :


Re: Cygwin Notes

more vi tips at http://www.rayninfo.co.uk/vimtips.html

Re: Cygwin Notes

Sorry, but I programmed in the "D" language at least 8 years ago while working on the Motorola Iridium project. "D" is a TeleUse proprietary GUI programming language. We hated it...here's a link: TeleUse D All the good names are taken.

Add a comment Send a TrackBack