! Linux Console Files % Some configuration files I sometimes need. Some configuration files I sometimes need; these are for command-line Linux work with PHP; they are minimal and depend on no other files. - ~/.bashrc TEXT --- # Find function f { if [ -z "$1" ] then echo "$0 [string to find in subtree file names]"; else find . | grep --color "$1" fi } #Grep function g { if [ -z "$1" ] then echo "$0 [string to grep -rni in subtree files]"; else grep -rni "$1" * | sed 's/^/vim /' | sed "s/\:\([0-9]\+\)\:\s*/ +\1 |||| /" | grep --color -i "$1"; fi } # Structure function s { if [ -z "$1" ] then echo "$0 [file to show class structure]" else sed 's/^[ \t]\+//g' "$1" | grep --color '\(\\|function [a-zA-Z0-9_]\+(\|class [a-zA-Z0-9_]\+\)' fi } --- - ~/.vimrc TEXT --- " -------------------------------------------------------------- " SUMMARY OF SHORTCUTS (Control keys) " -------------------------------------------------------------- " ) Apply commenting to line(s) or selection " ( Remove commenting from line(s) or selection " C-O write OUT a file. " C-I read IN a file. " C-K kill... Ctrl-OK is save and quit. " C-F toggle nice formatting (kill during cut & paste) " C-L run PHP lint " C-J drop into PHP shell (:!php -qa) " C-N cycle through multiple open files (next) " C-P cycle through multiple open files (previous) " C-H toggle search highlighting " e.g. when using vim `grep -rnil 'pattern' *` " C-E edit my ~/.vimrc settings (splitscreen) " C-U update (reload) my ~/.vimrc settings " -------------------------------------------------------------- " expedite ~/.vimrc edit & reload map :split ~/.vimrc map :source ~/.vimrc " insert initials and date stamp [NC 2013-04-18] -- %b is e.g. Jan iabbrev dmy =strftime("[NC %Y-%m-%d]") " walk-up / walk-down commenting map ) I// j map ( k^4x " navigation map :split . map :write map :quit map :prev map :next " make it easy to grab HTML tags map ] f> map [ F< " general settings set cindent set incsearch set formatoptions=tcqr set ignorecase set smartcase set history=100 set shiftwidth=4 set tabstop=4 set expandtab " C-f to toggle formatting map :set number! :set autoindent! " other formatting options map gqap map :se hls! " initialise formatting set number set autoindent syntax on " auto-complete PHP tags (Ctrl-X Ctrl-K) set dictionary=~/php.dictionary autocmd BufNewFile,BufRead *.phtml set filetype=php " Set ctags for my current main project. " Must add an auto-refresh sometime. " :set tags=~/.vim/ctags " Setup PHP lint and PHP shell map :!php -l "%" map :!php -qa --- - ~/.ctags TEXT --- -R --exclude=.git --tag-relative=yes --PHP-kinds=+cf-v --regex-PHP=/abstract\s+class\s+([^ ]+)/\1/c/ --regex-PHP=/interface\s+([^ ]+)/\1/c/ --regex-PHP=/(public\s+|static\s+|abstract\s+|protected\s+|private\s+)function\s+\&?\s*([^ (]+)/\2/f/ ---

Κρήνη εὐκρὰς πρὸς χειμῶνα καὶ θέρος.
A stream of good temperature, summer and winter.

©2012–13 Nigel Chapman, Blue Mountains stream photograph ©2010 Mario Herrmann (used by permission). Time to render page: 0.708 ms.