Modified Makefile for vi Juhapekka Tolvanen http://iki.fi/juhtolv juhtolv (at) iki (dot) fi I modified Makefile of vi (maintained by Gunnar Ritter) in order to make it more suitable for users of GNU Stow. http://www.gnu.org/software/stow/ Modified things can be easily found, if you look for character string ”XXX” or use utility called ”diff”. First you need to get sourcecode of vi via this WWW-site: http://ex-vi.sourceforge.net/ Compiling goes like this. I used sourcepackage ex-050325.tar.bz2 . If you use some other version, change version number in following commands and in the beginning of Makefile. Usage: 1) Unpack ex-050325.tar.bz2 2) cd ex-050325 3) Subtitute original Makefile with mine: cp -f (SOME PATH)Makefile-ex-050325-juhtolv Makefile 4) You may want to edit config.h in order to avoid error message ”Terminal too wide”: Open up some terminal emulator with smallest font you still can read. Make it fullscreen. Then run command ”resize” in it. Output should be something like this: COLUMNS=179; LINES=76; export COLUMNS LINES; Then pay attention to these lines in config.h : #ifndef VMUNIX #define TUBELINES 70 /* Number of screen lines for visual */ #define TUBECOLS 160 /* Number of screen columns for visual */ #define TUBESIZE 6000 /* Maximum screen size for visual */ #else /* VMUNIX */ #define TUBELINES 100 #define TUBECOLS 160 #define TUBESIZE 16000 #endif /* VMUNIX */ VMUNIX has been defined in Makefile. Let's round 179 COLUMNS to 190 COLUMNS and 76 LINES to 100 LINES. 190 times 100 is 19000 . Let's round it to 20000. Hence, I change those lines to this: #ifndef VMUNIX #define TUBELINES 70 /* Number of screen lines for visual */ #define TUBECOLS 160 /* Number of screen columns for visual */ #define TUBESIZE 6000 /* Maximum screen size for visual */ #else /* VMUNIX */ #define TUBELINES 100 #define TUBECOLS 190 #define TUBESIZE 20000 #endif /* VMUNIX */ Also these could be modified, but maybe it's no use: /* * Various buffer sizes. */ #ifndef VMUNIX #define ESIZE 128 /* Regular expression buffer size */ #define RHSSIZE 256 /* Size of rhs of substitute */ #define TAGSIZE 128 /* Tag length */ #define ONMSZ 64 /* Option name size */ #else /* VMUNIX */ #define ESIZE 1024 #define RHSSIZE 512 #define TAGSIZE 256 #define ONMSZ 256 #endif /* VMUNIX */ 5) Run make: make 6) Run these commands as root: mkdir /usr/local/stow/ex-050325 chmod ugo+rx,go-w /usr/local/stow/ex-050325 cd (SOME PATH TO SOURCE DIRECTORY) make install cd /usr/local/stow chmod -R ugo+rX,go-w ex-050325 stow ex-050325 That’s all. Now you have the original and traditional but well-maintained and modernized vi. You may want see my vi-settings, too: http://iki.fi/juhtolv/configs/vi/ Seeing man-pages of this vi may need these command: man -l /usr/local/stow/ex-050325/share/man/man1/vi.1 man -l /usr/local/stow/ex-050325/share/man/man1/ex.1 edit.1 is just a symbolic pointing to ex.1. vedit.1 and view.1 are just symbolic links pointing to vi.1 . If you want deinstall whole damn thing, run these command as root: cd /usr/local/stow stow -D ex-050325 Now command ”vi” will not run that binary. If you want to remove all files, just delete the whole directory: rm -rf ex-050325 ############################################################################# Help for text editors: For Emacs: Local Variables: *** mode: text *** coding: utf-8 *** End: *** For Vim: .. vim: set ft=text fenc=utf-8 :