activating php using vim
today i noticed that php has no yet been activated on my tiger. so ... let's go to the terminal, get vim at hand, and learn some basic commands for this powerful unix text editor!
use sudo because the file is read-only for mortals. enter password, and welcome to vim. now type:
so far for editing the config file. now restart the http-deamon with
just to mention some more useful vim commands:
for a more complete reference, see http://tnerual.eriogerg.free.fr/vim.html
sudo vim /etc/httpd/httpd.confuse sudo because the file is read-only for mortals. enter password, and welcome to vim. now type:
/php[enter] . . . . . . . . search for the first occurrence of the string "php"0 . . . . . . . . jump to beginning of the linex . . . . . . . . delete character under cursor (just in case: use u to undo...)n . . . . . . . . find the next occurrences of the previous search stringnn . . . . . . . . continue search0 . . . . . . . . jump ...x . . . . . . . . delete ...:wq . . . . . . . . write and quit.so far for editing the config file. now restart the http-deamon with
sudo apachectl graceful and your password. and there is your php, up and running.just to mention some more useful vim commands:
64gg . . . . . . . . jump to line 64gg . . . . . . . . jump to beginning of fileG . . . . . . . . jump to end of filei . . . . . . . . change to insertion mode ("textmode")[esc] . . . . . . . . end insertion modeu . . . . . . . . undo last command[ctrl]R . . . . . . . . redo last undo. . . . . . . . . repeat last commanddd . . . . . . . . delete current lineyy . . . . . . . . copy current line (yank)p . . . . . . . . paste line after cursor (put):q! . . . . . . . . quit and discard changesfor a more complete reference, see http://tnerual.eriogerg.free.fr/vim.html



