I show how to set up a software development environment on both PC's running Macs and Windows When we're done, we'll be able to develop programs in Java, Python, C++, Lisp and C using Unix tools.
Upon boot up, hit the F12 key to go into the boot menu. Then alter the boot sequence to boot from IDE CD-ROM device; this will disable boot from hard drive temporarily. Load the Windows XP setup disk into the first drive (DVD/CD) if you have two drives, and reboot. This will take a couple of hours.
To reinstall Windows XP, see Installing/Reinstalling Windows XP if you need it.
It's better to do a clean install if possible. After booting up from the Windows XP CD, delete the current partition, create one new C: partition of maximum size (57207MB), and format NTFS.
Select computer name = Peripatus, and select an administrator password. Now install Windows XP Service Pack 2 from CD. Don't forget to go back to the BIOS setup and change to boot from hard drive.
Download and install drivers for Dell Dimension 8250. Install the Ethernet driver first so you can connect to the internet.
Also the BIOS upgrade, Intel chipset driver, NVIDIA driver, and modem drivers.Install sound card driver separately.
Make sure firewall is on and automatic update is on. Now install Windows XP service pack 3 (SP3) and other updates using Start/Programs/Windows Update. Defragment the disk, and turn on check disk upon boot up. Reboot.
Install Norton Antivirus, run live update and scan the system.
Finally, go to Start/My Computer/right click on Manage. Go to Device Manager and scan for hardware changes (right click). Go to each device, and right click on update driver. Do a Windows Update again repeatedly until there are no new updates. Windows may have a driver crash if some of the old drivers haven't been updated yet. Just keep going, updating and rebooting.
Download the 6MB WIA USB driver for Windows XP from Cannon's web site. Unpack it and run setup.exe That didn't do it, so pulled up Start/Computer/Manage (right click) and rescanned the Canon A20 driver. I connected to the net and downloaded the driver. I plugged in the camera with its USB cable, turned it on and selected Windows Image file transfer. This worked.
Insert the 256MB Lexar JumpDriveSecure memory stick into any USB port. It will install software on C:/ drive and create tasks in the task bar. It will also ask you to set the drive configuration. You can change the settings to hide the drive after 20 minutes. box asking you if you want to dismount. You can partition most of the device to be a secure drive. Windows will autodetect the USB device is plugged in and assign it to PUBLIC(F:)/ drive. If you have configured the memory stick to have a secure (encrypted) partition, run F:/JDSecure/Windows/JDSecure31.exe. It will pop up a dialog box and ask you for your password, then mount a SECURE(G:)/ drive with your directories. To umount, right click the JumpDriveSecure task in the task bar and select Exit. You can then click on the Safely Remove Hardware task in the task bar and select Stop.
Troubleshooting. When you place it on the MacIntosh in OS X, do not initialize! Just ignore this message. Also do not make it removable! Ignore this too. If you have the misfortune to hose the drive on the Mac, so that it isn't readable on a Windows XP system, ask Lexar support for the JDResurrect.exe program. Insert the Jump Drive into a USB port, and run JDResurrect. Now go to Start/My Computer (right click)/Manage. In /System Tools/Device Manager, go to the top of the tree (your computer name) and right click "scan for hardware changes" Go to Disk Drives. Go to Storage/Disk Management. Right click "rescan disks". You'll see your hard drive probably as Disk 0 and the Jump Drive as Disk 1. Right click on Disk 1 and Initialize it. Now you can right click and select a new partition. Format the partition as DOS FAT with default settings. Now run JDSecure31.exe for Windows and you should be able to set up your drive.
In Start/Settings/Control Panel/Display Properties/Screen Saver/Power If battery power, turn off the hard drive after 15 minutes, system standby after 5 minutes, hibernation after 15 minutes.
In Display=>Properties=>Screensaver = flying through space, 5 minutes delay, 200 stars. Or, if you use the After Dark screen saver, turn off the screensaver. Turn on password protection.
In Start=>Settings=>Control Panel=>Desktop Themes, Modify Theme. You can also set desktop background file = any .bmp file, centered, stretched, smooth edges, show icons in all possible colors.
In Display=>Properties=>Appearance, select Windows XP style.
Open up the volume controls from the bottom right of the task bar. Set the CD volume high. Set the WAVE volume low, so you can play Beethoven symphonies loud without ears being hurt by window open/close sounds. For recording, set the WAVE volume high and speak loud into the microphone.
To prevent Windows OS from thrashing the virtual memory too much, do this: Run the disk defragmenter first on hard drive D: (the faster one). Go to My Computer/Control Panel/System Properties/Advanced/Performance/Virtual Memory/Let me specify my own virtual memory settings. Specify swapfile size in megabytes with minimum size = maximum size to prevent thrashing due to swapfile resizing. Press OK and restart the system.
Download and run page file defragmentation Defrag This site also has process monitor and file defragmentation utilities.
You need to add new programs to the path. Here's an example for Vim
Windows OS path is limited to 200 char, in which case you will get a "Path too long" error at run time when executing the autoexec.bat file. To fix it, add the following command to the file C:/config.sys
shell=%systemroot%\system32\command.com /E:xxxx
or
shell=c:\windows\command.com /P /E:2048
where xxxx can be value from 160 to 32,768 [bytes]. The /P switch will load command.com permanently into memory. Use set in DOS to see the default path to command.com. Caveats:
In C:/Windows/system.ini file, add the entry,
To avoid "Too many Parameters" message, place %path% in double quotes, e.g.
Make a shortcut on the desktop for C:/Windows/system32.cmd.exe On the DOS icon on the desktop and select Properties/Shortcuts/ Start in C:\Sean\WebSite. ??? Properties/Program/Batch File. In the edit field, type doskey /insert home cd "\SeanErikO'ConnorWebSite". Now type D: to go to the D: drive and type home to go to my web directory. ??? In Properties/Layout, select screen = 60 lines and 8x12 font size/M Set screen buffer size = 1000 lines. Position window left = 600.
File and Directory name completion is NOT enabled by default. You can enable or disable file name completion for a particular invocation of CMD.EXE with the /F:ON or /F:OFF switch. You can enable or disable completion for all invocations of CMD.EXE on a machine and/or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE:
and/or
with the hex value of a control character to use for a particular function (e.g. 0x4 is Ctrl-D and 0x6 is Ctrl-F). The user specific settings take precedence over the machine settings. The command line switches take precedence over the registry settings.
Copy the shortcut C:\WINDOWS\EXPLORER.EXE Open Explorer/Properties/Shortcut/Target and change to C:\WINDOWS\EXPLORER.EXE /e, C:\Sean\WebSite. If you want to turn off the left tree pane, add /n, before the /e. Now explorer will come up in the given directory. Go to view/general and select "web style", "show all files", "remember each folder's view settings". Go to folder options/view and select "like current folder", and "allow upper case file names", "full path in title bar". Select "autohide" for the taskbar.
To alter the size of thumbnails, add a new value to the registry. Run regedit, and go to the registry key, HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer. or HKEY_LOCAL_MACHINE/... From the regedit menu, choose Edit/New/DWORD Value. Type in ThumbnailSize and press Enter. Double click the new value. Enter a hexadecimal value between 32 and 256. Close the registry editor.
Start/Run/msconfig and select Startup show a list of programs activated at startup time. Remove any which you don't need, because their background tasks may slow down your system.
Select taskbar/autohide. Taskbar always on top. Windows NT Explorer change properties to show all file types. Change to display .h and .cpp and .c using notepad.
Go to C:/Windows/Start Menu/Programs, and delete any shortcuts not needed.
Get internet access ready first. Install from the CD-ROM into D:/Program Files/Norton Antivirus. Register online, then reboot. Do a full system scan.
You might also need to turn of antivirus checking of *.doc files when using Microsoft Word or else it may crash frequently.
Go to Lavasoft to install. Check for updates.
Download Spybot search and destroy. Install. Create registry backup. Immunize. Check for updates. Check for problems.
I had lots of pop-up messages appear on my screen. I fixed it by turning on the firewall in my internet connections. Go to Control Panel/Network and internet connections/ Network connections /Right click on a connection (e.g. Dial-up, NetZero)/ Properties/ Advanced /Internet Connection Firewall / Protect my computer... and also at the bottom /Settings/Services/ Click off all services. Do all your connections.
To get the Unix utilities ( make, cvs, diff, gcc, g++, gdb, etc), you'll need to download Xcode from Apple Developer Connection (free membership). For backup, you can take your Xcode30.dmg download file, and split it into segments with the command, hdiutil segment -o Xcode30 -segmentSize 100M /Users/seanoconnor/Desktop/Xcode30.dmg Segments can be burned to CD-ROM. To reinstall, copy from CD to your hard drive and launch the first segment; the OS will automatically get the others. More advice at flash tekkie
Load Cygwin utilities from Cygwin home. Choose download to disk without installing to C:/Install/Cygwin Use direct connection and pick a mirror site. Next, run setup.exe. Pick view=full. Now select all the defaults and also be sure to add bash, bison, byacc, cvs, ctags, diff, Subversion, subversion, flex, gcc, g++, gdb, hexedit, ncurses, make, python, sed, tar, zip and unzip. Then run setup again but this time install from the local disk. You'll get a cygwin icon on the desktop which you can launch shell commands from.
I'm using the BASH shell. Read the Beginner's Guide, Tutorial, and Reference then go to your home directory, under C:/Documents and Settings/Sean Erik O'Connor and place the bash startup files .bash_login, .bash_logout and .bashrc there.
If your user name in your /home directory contains spaces, it will cause trouble. cygwin gets it from the windows logon name. You can edit the /etc/passwd file and change the Cygwin user name (first field), then rename your directory.
#----------------------------------------------------------------------------
#
# TITLE
#
# .bashrc
#
# DESCRIPTION
#
#
# Bourne Again (bash) Shell startup file for Unix systems.
# Executed everytime we start a subshell.
# Install into your home directory ~.
# Used mostly with my Cygwin distribution on a Windows PC.
#
# Use source .bashrc to reset the environment after you are in a
# terminal window. Place the line "source .bashrc" into .bash_profile
# to execute this file's commands upon login.
#
# To debug, use sh -x .bashrc
#
# DATE
#
# 04 Apr 09
#
# AUTHOR
#
# Sean E. O'Connor
#
#----------------------------------------------------------------------------
#------------- Portability -------
# Ask for the host name and do settings accordingly.
# To unlock files, sudo chflags -R nouchg .
# To set the hostname manually on Mac OS X
# edit /etc/hostconfig: HOSTNAME=Artificer
# sudo hostname Artificer"
# sudo scutil --set LocalHostName Artificer
# sudo scutil --set ComputerName Artificer
# sudo scutil --set HostName Artificer
# In System Preferences/Sharing change 'Computer Name' to Artificer.
# In your local network configuration, rename the name provided by DHCP.
hostname=`python -c "import platform; print platform.node()"`
echo "Hostname is |${hostname}|"
# MacBookPro Intel Mac OS X
if [ "${hostname}" == "Artificer.local" ] || [ "${hostname}" == "Artificer" ] ; then
ls_color_option="-G"
root_dir="/Users/seanoconnor/Desktop"
extra_bin_path="/usr/local/bin"
thumb_drive="/Volumes/WANDERER"
desk_dir=${root_dir}
alias gvim=vim
alias vi=gvim
# Dell PC Windows XP.
elif [ "${hostname}" == "peripatus" ] ; then
ls_color_option="--color=tty" ;
root_dir="/cygdrive/c" ;
extra_bin_path="/cygdrive/c/Python25" ;
thumb_drive="/cygdrive/f" ;
desk_dir="${root_dir}/Documents and Settings/Sean Erik O'Connor/Desktop" ;
alias vi=gvim ;
# iMac Mac OS X
elif [ "${hostname}" == "SeanAdmin" ] ; then
ls_color_option="-G"
root_dir="/Users/seanoconnor/Desktop"
extra_bin_path="/usr/local/bin"
thumb_drive="/Volumes/WANDERER"
desk_dir=${root_dir}
alias gvim=vim
alias vi=gvim
# iMac Windows XP
elif [ "${hostname}" == "seanwinimac" ] ; then
ls_color_option="--color=tty"
root_dir="/home/Sean"
extra_bin_path="/cygdrive/c/Program Files/Python"
thumb_drive="/cygdrive/e"
desk_dir="/cygdrive/c/Documents and Settings/Sean/Desktop"
alias vi=gvim
fi
web_dir="${root_dir}/Sean/WebSite"
#------------- Export base directories for use by other programs -------------
# The root directory has /Sean under it and /Sean/WebSite underneath that.
export root_dir
export web_dir
export thumb_drive
echo "Root dir |${root_dir}|, web dir |${web_dir}|, thumb dir |${thumb_drive}|"
#------------- Directory Shorthands -------------
#
sean_dir="${root_dir}/Sean"
bin_dir="$HOME/bin"
util_dir="$HOME/Util"
stuff_dir="${sean_dir}/StuffToBeFiled"
bus_dir="${sean_dir}/Business"
acc_dir="${sean_dir}/Business/Money"
cal_dir="${sean_dir}/Business/CalendarContacts"
art_dir="${web_dir}/Art"
life_dir="${web_dir}/ComputerScience/Automata/Life"
lisp_dir="${web_dir}/ComputerScience/Compiler/ParserGeneratorAndParser/SourceCode/ParserGenerator"
math_dir="${web_dir}/Mathematics"
web_des_dir="${web_dir}/WebDesign"
web_main_dir="${web_des_dir}/MaintainWebPage/"
pp_dir="${math_dir}/AbstractAlgebra/PrimitivePolynomials"
prentice_dir="${web_dir}/Prentice"
pp_proj_dir="${pp_dir}/Project"
pp_bld_dir="${pp_dir}/Project/Build"
pp_src_dir="${pp_dir}/Project/SourceCode"
pp_exe_dir="${pp_bld_dir}/Bin"
prentice_bld_dir="${prentice_dir}/Project/Build"
prentice_src_dir="${prentice_dir}/Project/SourceCode"
alias web='cd "${web_dir}"'
alias stuff='cd ${stuff_dir}'
alias main='cd ${web_main_dir}'
alias art='cd ${art_dir}'
alias ppb='cd ${pp_bld_dir}'
alias pps='cd ${pp_src_dir}/Primpoly'
alias ppsc='cd ${pp_src_dir}/PrimpolyC'
alias desk='cd ${desk_dir}'
alias life='cd ${life_dir}'
alias pb='cd ${prentice_bld_dir}'
alias ps='cd ${prentice_src_dir}'
alias psp='cd ${prentice_src_dir}/Prentice'
alias psm='cd ${prentice_src_dir}/Model'
alias psv='cd ${prentice_src_dir}/View'
alias psr='cd ${prentice_src_dir}/Render'
alias ps='cd ${prentice_src_dir}'
alias priv='cd ${web_dir}/private'
alias calen='cd ${cal_dir}'
alias acc='cd ${acc_dir}'
alias lis='cd ${lisp_dir}'
alias ov='open -a MacVim'
#------------- Path -------------
#
# Be sure to put useful scripts and executables into the home bin directory: ~/bin
#
PATH="${PATH}:${extra_bin_path}"
export PATH
#------------- SVN and CVS -------
# Location of svn and cvs repositories.
export CVSROOT="${web_dir}/private/cvs"
export SVNDIR="${web_dir}/private/repos"
export SVNREPOS="file://${web_dir}/private/repos"
# Subversion editor to use for commit.s
export SVN_EDITOR="/usr/bin/vi"
#------------- Set prompt -------
#
# Define colors for the text in a prompt.
#
liteblue="\[\033[34m\]"
litegray="\[\033[37m\]"
red="\[\033[31m\]"
green="\[\033[32m\]"
blue="\[\033[34m\]"
yellow="\[\033[33m\]"
white="\[\033[0m\]"
# Set the prompt to
# time \@, date \d, user name \u, host name \h, current directory \w
# Set the title of the window \033]0;\w\007
wintitlecurdir="\033]0;\w\007"
###PS1="$white\033]0;\w\007\w$white$ "
PS1="$white$wintitlecurdir\d \@$white$ "
#------------- Shell options -------------
#
# Set vi edit mode for the command line.
# Hit
#============================================================================= # # FILE NAME # # .bash_profile # # DESCRIPTION # # bash shell startup file for Unix systems, executed upon login. # # Install into your home directory ~. # Also called .profile or .bash_login # #============================================================================= # source .bashrc
#============================================================================= # # FILE NAME # # .bash_logout # # DESCRIPTION # # bash shell executed upon logout. # Install into your home directory ~. # # #============================================================================= # # Clean up. # rm -f ~/.bash_history #rm -f ~/.viminfo
I use the GNU gdb debugger in Cygwin from the command line. Here are some basic gdb commands; see the complete gdb manual for details.
gdb Bin/Primpoly.exe - Load executable compiled with -g
gdb>b ppBigInt.cpp:456 - Set breakpoint at line.
gdb>b BigInt::operator* - Set breakpoint at function.
gdb>catch throw - Catch throws and print their line number.
gdb>catch catch - Stop at catch line number.
gdb>run 2 4 - Run to break or catchpoint.
gdb>i b - List breakpoints.
gdb>d 2 - Delete breakpoint number 2.
gdb>c - Continue.
gdb>n - Step to next line.
gdb>s - Step into functions.
gdb>f - Finish up a function.
gdb>u - Go to end of a loop.
gdb>l - List source at present location.
gdb>set listsize 20 - Show 20 lines at a time.
gdb>bt - Backtrace after a crash.
gdb>frame 1 - Jump to stack frame #1
gdb>set n=4 - Change variable value.
gdb>p foo - Print value of variable foo.
gdb>p fo
Start with the CVS to SVN Crossover Guide. and continue with the SVN Book. For CVS, start with the cvs tutorial, and continue with the cvs book.
For the Mac we have the svnX subversion GUI.
Here's an example of how I set up my Subversion and CVS repository for my Primpoly project.
If you have trouble with CVS root errors, you may need to go to the Primpoly/CVS directory and delete Root, which caches the CVS root information. Be sure do source .bashrc again from the cygwin command line again to make sure the CVSROOT environment variable is set correctly.
Somewhat long in the tooth, I use make
Cygwin or Mac OS X development tools give you the GNU C/C++ compiler.
Here are some C++ links, Bjarne Stroustrup's Page C++ FAQ Lite and the C++ Reference Documentation. and the C FAQ
Download Visual C++ 2008 express and follow instructions.
I haven't tried them yet but the C++ GUIs FoxTookit and WxWidgets sound interesting. WxWidgets looks a lot like Windows API with classes. Here is a tutorial ending up with source code for a tetris game.
Go to Python and download the latest version of Python from the site. Install into C:\Program Files\Python Go to Start/Control Panel/System/Advanced/Environment Variables and add the string ;C:\"Program Files"\Python25; to the end of the path. Test by doing Start/Run/cmd and typing python in the command window. You should see the interpreter running saying Python 2.5.1 ... Type quit() to exit. Keep the tutorial and library reference handy. Or better yet, download the whole set.
If you program LISP already, Python is very similar. I was programming in Perl and switched over to Python after discovering this article.
My parser generator project is coded in Common Lisp.
For CLISP. For version 2.38, assume you've downloaded CLISP on a Windows system into the directory C:\Program Files\CLisp\clisp-2.38 Run install.bat and answer yes to all the questions. Add the directory above to your system path in the environment variables.
Then open a command window and type clisp to bring up the Lisp interpreter. Or else you can open with the CLisp icon on the windows desktop.
Also download the CLISP manual to your local disk. First obtain wget for Windows, download and install on your system. Next use wget with -r (recursive mode) on the URL, http://clisp.cons.org/impnotes.html to download the whole manual.
For Mac OS X you can download Steel Bank Common Lisp and follow instructions in the INSTALL to get a bare-bones command line REPL. For convenience, I load my LISP parser generator project files in the SBCL startup file .sbclrc
(load "/Users/seanoconnor/Desktop/Sean/WebSite/ComputerScience/Compiler/ParserGeneratorAndParser/SourceCode/ParserGenerator/LR(1)AndLALR(1)ParserGenerator.lsp") (load "/Users/seanoconnor/Desktop/Sean/WebSite/ComputerScience/Compiler/ParserGeneratorAndParser/SourceCode/ParserGenerator/LR(1)AndLALR(1)Parser.lsp") (test-parser-generator) (test-parser)
However, your life will be much easier if youw download and install Slime Unpack and install the slime directory in /Applications/slime then install this .emacs file in your home directory:
(setq inferior-lisp-program "/usr/local/bin/sbcl") (add-to-list 'load-path "/Applications/slime") (require 'slime) (slime-setup)
You should also install Carbon Emacs, and read up on the Emacs documentation Invoke Emacs and with the command M-x slime go into Lisp interaction mode. Useful REPL commands are Control-c Control-p to move back one prompt, Control-c Control-n to move forward, Control-a and Control-e to go to beginning and end of the line, Control-x o to switch between buffers, Control-C Control-D d to lookup documentation for a symbol, and Control-X Control-S to exit emacs.
There is lots of good LISP documentation online from a quick tutorial a complete book, another good book a tutorial with example programs. and finally a complete reference.
I haven't tried it, but it's possible the software will run also under XLISP.
Windows For Windows PC systems, first download the file Java development kit, JDK 6 Update ≥ 3 with NetBeans ≥ 5.5.1 IDE Now click on the downloaded executable file jdk-NuN-nb-N_N_N-win-ml.exe to install the Java SDK. This includes the Java runtime environment as well as the compiler (javac), interpreter (java), debugger (jdb), applet viewer (appletviewer). The SDK is installed into C:\Program Files\Java\jdkN.N.N_NN/bin and the NetBeans IDE is installed into C:\Program Files\netbeans-N.N.N. It will appear as an icon on the desktop.
In Settings->System->Advanced->Environment Variables, under System Variables, edit the path to include ...;C:\Program Files\Java\jdkN.N.N_NN\bin;...
Now open a DOS or Cygwin command window and test run the Java compiler, interpreter, and debugger javac -version, java -version, and jdb -version. You should get back version number N.N.N_NN
Go to Perl and download ActivePerl for Windows XP from the site Perl for Windows Run the *.msi file from the CD-ROM. Install into D:\Program Files\perl The autoexec.bat path variable is automatically updated by the installation program. If not, add the command, set PATH=D:\"Program Files"\Perl\bin;"%PATH%" to the file C:/autoexec.bat Reboot. Test using a simple Perl program, and do perl -version on the command line.
Octave is a free MATLAB clone. On Macs you need to install gnuplot. Download the gnuplot source and unpack it into a directory. Run ./configure --with-readline=builtin, then run make and finally sudo make install.
Wise words from http://sourceforge.net/tracker/index...55&atid=102055, In a nutshell, this is a problem with OSX itself. Apple chose to ship Leopard with an emulated libreadline package. But the emulation is incomplete, and programs that link against it expecting a "real" libreadline fail with erros like the ones you quote. I suggest complaining to Apple. They should hear from their users that their choice of libraries was not good. Meanwhile, your options are either (1) delete the broken libreadline that shipped with Leopard and replace it with the real gnu libreadline (2) tell gnuplot not to use libreadline at all ./configure --with-readline=builtin
Run Octave.app from /Applications. It comes up in a terminal window. In the window, cd to your working directory containing your MATLAB .m files. Type the name of your MATLAB function or type the name of the .m file if you have just an inline main program. Plots will pop up in a separate window using the X11 windowing system.
To view Mathematica files download the free math player
Insert Mathematica CD-ROM. Install all onto hard disk. Type in password. Custom install all components into D:/Program Files/Wolfram Research. Create shortcut on desktop to C:\Program Files\Wolfram Research\Mathematica\4.0 Remember SHIFT-ENTER evaluates expressions.
Download gvim from Vim. Also install the Vim Tutorial Book, vimbook-OPL.pdf in the same directory under subdirectory /Notes. Don't forget the Vim User Manual, FAQ and download instructions. To do file differences, load the first file, ignore whitespace with :diffopt=iwhite, then do :diffsplit <second file name> :diffupdate will resync if needed. Put my customized file .vimrc and also FunctionHeaderTemplate.txt etc into C:/Program Files/vim or ~ (Unix home directory). Here is my .vimrc
"============================================================================= " " NAME " " .vimrc " " DESCRIPTION " " Settings for Vim editor loaded upon startup in MS Windows. " " NOTES " " UNIX, Mac OS X: Copy to ~/.vimrc " Windows XP: Copy to C:/Program Files/vim/_vimrc " " AUTHOR " " Bram Moolenaar <Bram@vim.org> " Sean E. O'Connor 14 Dec 2007 " "============================================================================= " " Use Vim settings, rather then Vi settings (much better!). " This must be first, because it changes other options as a side effect. set nocompatible " Don't know what this is. source $VIMRUNTIME/vimrc_example.vim " Turn on MS Windows behavior. source $VIMRUNTIME/mswin.vim " Mouse and window behavior tuned for Microslime Windows. behave mswin " When started as "evim", evim.vim will already have done these settings. if v:progname =~? "evim" finish endif " Allow backspacing over everything in insert mode. set backspace=indent,eol,start set backup " Keep a backup file suffixed with ~ after editing. set history=500 " Keep 500 lines of command line history. set ruler " Show the cursor position all the time. set showcmd " Display incomplete commands. set incsearch " Do incremental searching. set hlsearch " Searches are highlighted. set lines=45 " Number of lines visible on the screen. set columns=80 " Number of columns visible on the screen. winpos 400 45 " Initial window position (MacBookPro). set winwidth=140 " Initial window width. set winminwidth=140 " set smartindent " Use smart indenting. set shiftwidth=4 " Indent 4 spaces. set tabstop=4 " Tabs are 4 spaces wide. set expandtab " Expand tabs into spaces. set showmatch " Show matching parentheses. set matchtime=5 " Match time is 1/2 sec. " Set file paths to my most commonly used directories (MacBookPro). set path="~/Applications/vim/**" set path+="~/Desktop/Sean/WebSite/**" " Error blink and bell. set errorbells set visualbell " Default directory is my current active subdirectory " in my web page directory. " This is where :e . takes us. cd ~/Desktop/Sean/WebSite/Mathematics/AbstractAlgebra/PrimitivePolynomials/Project/SourceCode " Set paths for tags files generated by Exuberant ctags (I renamed it xtags)" set tags=./tags,tags,~/Desktop/Sean/WebSite/Mathematics/AbstractAlgebra/PrimitivePolynomials/Project/SourceCode/tags " Add new syntax highlighting for certain keywords. Classify them as type xType syntax keyword xType uint syntax keyword xType uint32 syntax keyword xType UInt32 syntax keyword xType SInt32 syntax keyword xType UInt16 syntax keyword xType SInt16 syntax keyword xType UInt8 syntax keyword xType SInt8 syntax keyword xType BigInt " Color them the same as the C group-name "Type". highlight link xType Type " =============================================================================== " | Use the Torte color scheme for the full gVim GUI but " | default for launching vim from a command window. " =============================================================================== if has("gui_running") " Use the Torte color scheme when we run vim in GUI mode. " Otherwise if launched from the terminal, use the default colors. colorscheme torte if has("gui_gtk2") set guifont=Courier\ New\ 11 elseif has("gui_kde") echoerr "Sorry, please look into your kvim documentation" elseif has("x11") set guifont=-*-courier-medium-r-normal-*-*-180-*-*-m-*-* elseif has("gui_win32") set guifont=Courier_New:h13:b "set guifont=Lucida_Console:h13:cDEFAULT elseif has("gui_mac") ":set guifont=* :set guifont=Lucida\ Console:h15 else :set guifont=Lucida\ Console:h15 endif endif " Abbreviations. :iabbrev #b /*============================================================================= :iabbrev #e <Space> " ============================================================================== " | " | Useful vim macros " | " | ,sou Read new user settings. " | ,w Save the file. " | ,tbe Trim blanks at the end of every line. " | ,fh Load a file header template. " | ,fu Load a function header template. " | ,cl Load a class header template. " | ,hp Surround text with an html paragraph. " | ,tr Surround text with table first line. " | ,td Surround text with table first subsequent lines. " | ,t Toggle comment line. " | ,cc Convert single line C to C++ comment. " | ,j Justify a paragraph. " | " ============================================================================== " Reload this VIM resource file. map ,sou :source $HOME/.vimrc<CR> " Save the file. map ,sa :w<CR> " Trim blanks at end of all lines. map ,tbe :%s/\s*$//<CR> " Load a file header template. map ,fh :read $VIM/fileHeaderTemplate.txt<CR> " Load a function header template. map ,fu :read $VIM/functionHeaderTemplate.txt<CR> " Load a class header template. map ,cl :read $VIM/classHeaderTemplate.txt<CR> " Throw an HTML paragraph around a plain text paragraph. map ,hp {o<p>lt;Esc>i<p>lt;CR>lt;Esc> map ,tr {o<tr>lt;Esc>j0i<td>lt;em class="col1">lt;Esc>a<em>lt;td>lt;Esc> map ,td 0i<td>lt;Esc>a<td>lt;Esc> " Make p in Visual mode replace the selected text with the "" register. vnoremap p <Esc>let current_reg = @"<CR>gvs<C-R>current_reg<CR>lt;Esc> " Switch syntax highlighting on, when the terminal has colors. " Also switch on highlighting the last used search pattern. if &t_Co > 2 || has("gui_running") syntax on set hlsearch endif " Extra syntax highlighting for some keywords. " Classify them as type=xType syntax keyword xType BigInt syntax keyword xType uint " Color them the same as C/C++ group-name=Type. highlight link xType Type " Toggle comment lines. You can highlight the range " with the mouse and then do ,t function! ToggleComment() " Get the line under the cursor " Check if it begins with | if getline(".") =~ '^|' let s:savedSearchPat=@/ s/^|// let @/=s:savedSearchPat else let s:savedSearchPat=@/ s/^/|/ let @/=s:savedSearchPat endif endfunction map ,t :call ToggleComment()<CR> " Convert C comments on a line to C++ comments. function! ConvertCCommentToCpp() " Get the line under the cursor " Check if contains a /* if getline(".") =~ '\/\*' let s:savedSearchPat=@/ s/\/\*/\/\// let @/=s:savedSearchPat endif if getline(".") =~ '\*\/' let s:savedSearchPat=@/ s/\*\/// let @/=s:savedSearchPat endif endfunction map ,cc :call ConvertCCommentToCpp()<CR> " Justify a paragraph. map ,j gqap " Only do this part when compiled with support for autocommands. if has("autocmd") " Enable file type detection. " Use the default filetype settings, so that mail gets 'tw' set to 72, " 'cindent' is on in C files, etc. " Also load indent files, to automatically do language-dependent indenting. filetype plugin indent on " For all text files set 'textwidth' to 78 characters. autocmd FileType text setlocal textwidth=78 " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invalid or when inside an event handler " (happens when dropping a file on gvim). autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") < line("$") | \ exe "normal g`\"" | \ endif endif " has("autocmd") set diffexpr=MyDiff() function MyDiff() let opt = '-a --binary ' if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif let arg1 = v:fname_in if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif let arg2 = v:fname_new if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif let arg3 = v:fname_out if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif if &sh =~ '\<cmd' silent execute '!""C:\Program Files\Vim\vim71\diff" ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . '"' else silent execute '!C:\Program" Files\Vim\vim71\diff" ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 endif endfunction
To properly syntax-color Perl files with the *.prl file name extension, edit C:/Program Files/vim71/syntax/perl.vim and add *.prl to the lines below:
" Perl
if has("fname_case")
au BufNewFile,BufRead *.pl,*.PL,*.prl call FTCheck_pl()
else
au BufNewFile,BufRead *.pl,*.prl call FTCheck_pl()
endif
When you right click on a file name with a .lsp extension, you should see Vim in the Open With list. If you can't see it, run regedit, go to HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/FileExts/ .lsp/OpenWithList. You'll see Names a, b, c, d, etc. Change one of them or add a new one with (for example) Name=b, Type=REG_SZ and Data=gvim.exe. Make sure Name=MRUList with Type=REG_SZ has Data=c in its list.
If you can't get gvim to open a *.lsp file in explorer when you click on the file name, run regedit, go to HKEY_CURRENT_USER/Software/Classes/Applications/gvim.exe create subdirectories /shell/open/command in command, let the name=(Default), Type=REG_SZ and the Data= "C:\Program Files\vim\vim71\gvim.exe" "%1" Now you should be able to associate *.lsp files with gvim.exe HKEY_CLASSES_ROOT/.lsp has Name=(Default), Type=REG_SZ, Data=Vim.Application.
Edit C:/Program Files/vim71/syntax/c.vim and add the keyword uint to the list of keywords beginning with int.
You should also install Exuberant ctags to make your programming life easier. Follow instructions on how to compile the source on Mac OS X. You may need to edit the makefile to set the C compiler and its compile and link flags properly. To use it, let's say your C++ source code is in /Sean/Project/SourceCode. Go up one directory and generate a tags file,
cd /Sean/Project ctags -R
In VIM, do :set tags=./tags,tags,/Sean/Project/tags. Now, when you edit a C++ file in VIM, go to a function name and do Ctrl-] to zap to the definition of the function and Ctrl-T to get back. If there are duplicates, use :ts, e.g. :ts operator = shows a list of possibilities to pick.
C++ operators will cause trouble, so edit the tags file to eliminate spaces using :1,$s/operator /operator/g to convert tags such as "operator +=" to "operator+=" for example. Also set the flag at the top of the ctags file to indicate UNSORTED, i.e. don't use binary search. To jump, highlight operator+= with the mouse, then hit Ctrl-], or use :tag operator+=. If there is ambiguity, use the command :ts operator+= and select the tag you wish to jump to.
Similar to Paintshop Pro and Adobe Photoshop with paint tools and layers, but free, GIMP runs on both Windows, Mac, and Linux download it and its documentation from Gimp
A 3D rendering and animation tool, free from Blender org
Not free, but a useful editor for drawing diagrams, OmniGraffle
Free office suite software set with spreadsheets, presentation software, word processing, and drawing. Download the Windows XP version from Open Office.
Install. Open a Word file. Type in product key. Connect to internet. Activate. Install MS Office SP1 from CD-ROM which was obtained from Microsoft's web site.
Copy shortcuts from Start Menu to desktop. Hide the office assistant. Copy Celtic font file celtic.tff to C:/Windows/Fonts. Go to the MS Office update page, using MS Internet Explorer and turn on Active X controls in the browser. Use the Microsoft Office Update detection feature and install all updates. Turn off virus checker if crashes occur. Test Word with equation editor, Excel, etc. Install Office 2000 HTML Filter 2.0 (msontmf2.exe) from download. On the File menu, point to Export To and then click Compact HTML to generate HTML from Word *.doc documents.
Apple's competitor to Microsoft Office is iWork (Numbers, Pages, Keynote)
Download acrobat 6 reader from Adobe. Run setup.exe and place into D:\Program Files\Adobe\Acrobat.
Install the Ghostscript interpreter following the instructions from Ghostscript.
For Mac OS X, install from MacTex TeX User's Group. and for Windows download LaTeX.
A good place to start is to read the documentation
Connect both computers Mac and PC with an Ethernet cable. I'll discuss the basics; for details, see move to a Mac
Turn on simple file sharing on Windows XP using My Computer/Tools/Folder Options/View tab/Use Simple File Sharing check box
Turn off simple file sharing and go to the folder you want to share in Explorer. Then type Properties/Sharing/ Select Share this Folder, type in a Share name, select Permissions and Add the user name. Finally, go to Firewall/Exceptions/select File and Printer Sharing.
On the Mac, do Finder/Go/Connect to Server and type Server Address = smb://nnn.nnn.nnn.nnn Then click Connect and type the name of the volume to mount.
On the Mac use the built-in email
Download Eudora for Windows, sponsored mode.
You need a POP3 server. If you have an ISP, they will most likely block SMTP port 25 for outgoing email, so you must use their SMTP server and go through a username and password authentication step. At a company, you can probably use their SMTP server.
Eudora Settings. Create two new personalities with different account settings.
Finally under Tools/Options/Sending Mail, set SMTP Relay Personality= "SMTP Account"
When you set up Filters, check manual. Then you can select messages with the Ctrl key and do Ctrl-shift-L to apply the email filters.
To switch off pop-up advertising do the following: Switch off Microsoft messenger service. Start/Control Panel/Classic View/Administrative Tools/Services Double click Messenger to get its Properties. Startup type: Set to Manual. Service status: Set to Stop.
Installs automatically with Windows XP. In Tools/Internet Options, set home page to file:///C:/Sean/WebSite/index.html.
Download the latest from Netzero Run netzero.exe and install into C:\Program Files\Netzero. Go through setup procedure. Choose local phone numbers. Allow updates to the new version when logging in periodically.
Load VNC server and client from Real VNC for Windows. Follow instructions. Show all icons. Select a password for the server. You can now connect to remote machines, view their screens in a window and use the mouse and keyboard to operate them. The remote machine needs to be running the VNC server and have a password defined for the remote login. You may need to type in the IP address of the machine instead of its name. Over a company firewall, you can operate if you have a VPN tunnel connection set up first. For the VNC server, which starts up automatically, click its icon in the toolbar and set the password. To prevent disconnection, click on options/inputs/rate limit mouse move events, and don't move the mouse when the VNC background is first being painted.
I use FileZilla Under the Edit/Settings, turn off the option "Use Multiple Connections", do file overwrite if newer. Under File/Site manager, add a new server and fill in the ftp hostname, user name, account, and password.
Install PKZIP from PKWare shareware from PKWARE ftp site: pk250W32.exe, and pk250w32.txt. Open up a new zip file, and under preferences, select relative path, and recursive, then save as default settings. Install into D:\Program Files\PKZip.
Gzip is used by the Free Software Foundation to compress files on Unix systems . Place into D:/Program Files/GZip
Download the Firefox browser. Do a custom install to directory C:\Program Files\Mozilla Firefox Click "Developer Tools" Import from MS IE. Make it the default browser.
Set Tools/options/General/Home page location = file:///C:/Sean/WebSite/index.html Add my web page to the Bookmarks Toolbar Folder.
Go to Firefox/Tools/Extensions/Get More Extensions. Search for and load Adblock and ViewSourceWith. Close and restart Firefox. On Windows XP, in the ViewSourceWith settings, add the new editor path C:\Program Files\vim\vimNN\gvim.exe and name it Vim Editor. Set Ctrl+Shift+U as your hotkey. On Mac OS X, set editor path to /usr/bin/open, and parameters to -a /Applications/Vim.app $f. Set the hotkey to Shift + Ctrl (you'll actually be using the APPLE key instead) + U.
Install Macromedia Flash player 7 when prompted for it by a web site.
Download from iTunes. Be sure you have your music library backed up. It's under C:/MyMusic/iTunes
To copy music library from PC to Mac, open iTunes on the Mac, select File/Add to Library and go to the PC's shared folder in /My Documents/My Music.
To copy music library from Mac to Mac, copy the /Music/iTunes directory. Authorize your computer at the iTunes store.
Download from Safari.
Life32 Turn on DirectX in Settings=>Display. The program will be MUCH faster.
Window and Linux executables and source code is available for the chess engine Chenard
Install Winboard which is a chess GUI. Install the Arasan chess engine, arsanx.exe. Start up Winboard, then select "Use an Internet Chess Server", type in "freechess.org /icsport=5000 /icshelper=timeseal", check "Additional options" and type in, -ics -zp -autoflag -fcp "C:\Games\ArasanChess\arasanx.exe -ics -H 8000" For KKF chess playing atomic, type in -ics -zp -autoflag -fcp "C:\Games\KKFChess\kkf.exe /variant atomic -ics"
Stellarium is a free planetarium program.
Bricks 2000 is Tetris clone for Windows. Copy to D:/Games/Bri'2000. Move shortcut to desktop. There is also a Java tetris which you can run on the Mac.
Copy from CD-ROM.
Same for other games D:/Games/DOSAnimations, D:/Games/Blockout, D:/Games/Animations, D:/Games/AfterDark, D:/Games/FortuneCookie, D:/Games/Fractal, D:/Games/TreasureCove.
Copyright © 1999-2009 by Sean Erik O'Connor. All Rights Reserved. last updated 27 Oct 09.