I show how to set up a software development environment on both PC's running Windows and Macs 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; 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.
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, administrator password. Finally, go back to the BIOS setup and change to boot from hard drive.
Install drivers for Dell Dimension 8250. Install the BIOS upgrade, Intel chipset driver, NVIDIA driver, Intel ethernet driver, and modem drivers.
Install sound card driver.
Now install Windows XP service pack 2 (SP2).
Connect to the internet and run Windows update. This may take a while to load ~100 updates.
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.
Skip online registration. Enter the area code. Fax to someone's FAX machine to test it. Move the shortcut icon to the desktop.
Run setup.exe and install into D:\Persorg. Ignore non-fatal errors. Move the shortcut to the desktop. If the PC link quits, reset the organizer using the reset button, then download all the software from the PC to the organizer. Upload all recent information from the personal organizer: select all applications, overwrite, keep Wizard version. Move the shortcut icon to the desktop. Save all data to sean.9db and sean2.9db
Install an IEEE-1284 cable between the printer and the parallel port LPT1 at the back of the computer. Turn on the printer. Boot up the computer. Ignore the Windows dialog box message which says it detected new hardware: just cancel out of it. Load the CD-ROM which came with the printer. Install setup.exe from the CD-ROM drive F: Reboot Windows. Don't install extra software. Register the printer through the modem when asked by the install program. Reinstall ink cartridges firmly, if they aren't recognized as valid. Align the ink cartridges following instructions. Clean the cartridges. Test print a page. Test printer-computer communications.
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.
Go to Settings=>Control Panel=>Add New Hardware and run automatically detect new hardware. Specifiy that the device is not in the list. You should detect the 2880 Sportster modem on COM2.
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=>Properties=>Performance=>Virtual Memory=>Let me specify my own virtual memory settings. Chose disk D: for the swapfile. Specify swapfile size in megabytes with minimum size = maximum size = 300 MB to prevent thrashing due to swapfile resizing. Use a size which is 2.5 times the amount of installed RAM. Press OK and restart the system. If you have 16MB or more RAM, open system.ini and edit it to add the lines,
Set the size (in MB) to about 25% of the amount of installed RAM. Defragment C: drive now and check it for errors.
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:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar
and/or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar
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.
Use Start/Settings/Find Files or Folders to locate them.
| Shortcuts on my Desktop | |
| Name | Location |
| Macromedia Flash | |
| CLisp | |
| Netbeans | |
| JDSecure | |
| Tutorials Java API Python Fortrash | |
| Topmost Clock | |
| iTunes | |
| Safari | |
| FileZilla FTP client | "C:\Program Files\FileZilla_FTPClient\FileZilla.exe" |
| Netzero ISP | "C:\Program Files\NetZero\exec.exe" | VNC client | "C:\Program Files\RealVNC\VNC4\vncviewer.exe" |
| Eudora email client | "C:\Program Files\Qualcomm\Eudora\Eudora.exe" "C:\Sean\Business\Career\Mailbox" |
| Outlook Express mail client | "C:\Program Files\Outlook Express\msimn.exe" |
| Firefox browser | "C:\Program Files\Mozilla Firefox\firefox.exe" |
| Mathematica | "C:\Program Files\Wolfram Research\Mathematica\4.0\Mathematica.exe" |
| Visual C++ Compiler IDE | "C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\MSDEV.EXE" |
| DevC++ | "C:\Dev-Cpp\devcpp.exe" |
| Windows Explorer | C:\WINDOWS\explorer.exe /e, C:\Sean\WebSite |
| Windiff | "C:\Program Files\Microsoft Visual Studio\COMMON\Tools\WINDIFF.EXE |
| Cygwin | C:\cygwin\cygwin.bat |
| Vim | C:\Program Files\vim\vim71\gvim.exe |
| TeX | "C:\Program Files\TeXnicCenter\TEXCNTR.EXE" |
| Word | ""C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE" |
| Excel | "C:\Program Files\Microsoft Office\OFFICE 11\EXCEL.EXE" |
| Open Office | "C:\Program Files\OpenOffice.org1.1.4\program\soffice.exe" |
| Paintshop Pro | "D:\Program Files\Paint Shop Pro\Psp.exe" |
| Recycle Bin | Installed by Windows XP |
| Media Player | "C:\Program Files\Windows Media Player\MPLAYER2.EXE" |
| Spybot Search and Destroy | "C:\Program Files\Spybot\SpybotSD.exe" |
| Adaware | "C:\Program Files\Lavasoft\Ad-Aware SE Personal\Ad-Aware.exe" |
| Norton Antivirus | "C:\Program Files\Common Files\Symantec Shared\NMain.exe" /dat:C:\Program Files\Norton AntiVirus\navui.nsi |
| Sound Recorder | C:\WINDOWS\SNDREC32.EXE |
| PKZip | "C:\Program Files\PKZip\PKZIPW.EXE" |
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.
Install and update from the web.
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, cvs, 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 May 08
#
# AUTHOR
#
# Sean E. O'Connor
#
#----------------------------------------------------------------------------
#------------- Portability -------
# Ask for the host name.
# To unlock files, sudo chflags -R nouchg .
hostname=`python -c "import platform; print platform.node()"`
echo "Hostname is |${hostname}|"
# Dell PC / Windows XP.
if [ "${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 ;
# Mac G5 / Mac OS X
elif [ "${hostname}" == "Seans-G5-PPC-Mac.local" ] || [ "${hostname}" == "oconnors.apple.com" ] ; 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
# MacBookPro Intel / Mac OS X
elif [ "${hostname}" == "Artifex.local" ] || [ "${hostname}" == "Macintosh" ] ; 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 / Mac OS X
elif [ "${hostname: -11}" == "1.apple.com" ] ; then
ls_color_option="-G"
root_dir="/Volumes/BOOTCAMP/cygwin/home/Sean"
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="${root_dir}/Documents and Settings/Sean Erik O'Connor/Desktop"
alias vi=gvim
fi
web_dir="${root_dir}/Sean/WebSite"
echo "Web directory = |${web_dir}|"
#------------- 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
#------------- 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}'
#------------- Path -------------
#
# Be sure to put useful scripts and executables into the home bin directory: ~/bin
#
PATH="${PATH}:${extra_bin_path}"
export PATH
#------------- CVS -------
# Location of cvs repository.
#
export CVSROOT="${web_dir}/private/cvs"
#------------- 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
First read the introductory cvs tutorial, Then be sure to read the cvs book.
Here's an example of how I set up my 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.
Cygwin or Mac OS X development tools give you the GNU C/C++ compiler.
Download Visual C++ 2008 express and follow instructions.
Download from Bloodshed and install to "C:\Dev-Cpp" directory. Link a shortcut on the Desktop to C:\Dev-cpp\devcpp.exe"
I haven't tried them yet but the C++ GUIs FoxTookit and WxWidgets sound interesting.
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 to get a bare-bones command line REPL. But read through this article on how to install Common Lisp on your Mac with EMACS/SLIME interaction mode.
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.
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.
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. 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 the font on different systems. 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=Monaco:h14:b else set guifont=Courier_New:h13:cDEFAULT 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 $VIM/_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.
Paintshop Pro 7.0 Windows CD is copy protected. Load Paintshop Pro Version 7.0 from CD-ROM and follow on-screen instructions, installing all features. Download 7.04 upgrade from Corel and install.
Graffle Mac runs on the Mac.
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. Get MS Office free updates. Turn on Active X controls in the browser following Microsoft Web page instructions. 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.
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
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.
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.
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.
Download from Safari.
Put all games into D:/Games directory.
Life32 Turn on DirectX in Settings=>Display. The program will be MUCH faster.
Copy the source and executables from CD-ROM. Turn on the option to speak moves.
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"
Bricks 2000 is Tetris clone. Copy to D:/Games/Bri'2000. Move shortcut to desktop.
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-2008 by Sean Erik O'Connor. All Rights Reserved. last updated 12 May 08.