Friday, June 22, 2007

Excel - Custom page numbering


  • View → Header and Footer...
  • "Custom Header..." button
  • Type these into any one of the sections:

    InputResult for page 1
    &[Page]+5&6
    -&[Page]+5--6-
    [&[Page]+5][6]
    (&[Page]+5)(6)

Wednesday, June 20, 2007

VIM - minibufexpl

Script: minibufexpl.vim
"MINIBUFEXPLORER Stuff (Enter "\mbe" minus quotes quickly to bring it up)
""Commands:
" Ctrl-PgDown - goto next buffer
" Ctrl-PgUp - goto prev buffer
" \-Backspace-= - toggle minibufexplorer
"let g:miniBufExplMaxSize = 3 "allow up to 3 lines of buffers
let g:miniBufExplModSelTarget=1
"map mbo :MiniBufExplorer
noremap :bn
inoremap :bn
cnoremap :bn
noremap :bp
inoremap :bp
cnoremap :bp
noremap = :TMiniBufExplorer
noremap u :UMiniBufExplorer

set hid "Hide abandoned buffers in order to not loose undo history

Monday, June 18, 2007

KDE - Default browser

$ kcontrol
KDE Components → Default Applications → Web Browser
Under Default Component, choose "In the following browser"
Type in: firefox (or your browser of choice)



Then go to KDE Components → File Associations.
Go to Text → html.
Click Firefox and press the Move Up button.

Wednesday, June 13, 2007

LINUX/UNIX - inputrc options

Add this to your ~/.inputrc to
# get default system bindings
$include /etc/inputrc

# ignore case on tab complete
set completion-ignore-case On

# prefer visual bell
set prefer-visible-bell

Tuesday, June 12, 2007

Perl - Find and replace all

Find cpp and hpp recursively from the current directory then append those files onto the perl command, which substitutes "old" for "new" in those files while creating .bak backups.
find . -name "*.[ch]pp" -type f | xargs perl –i.bak –p –e 's/old/new/g;'

or non recursive:
perl -pi -w -e 's/search/replace/g;' *.php
-e means execute the following line of code.
-i means edit in-place
-w write warnings
-p loop

Thursday, June 7, 2007

VIM - Multiple highlighted searches

Script link
:Search <pattern1>
:Search <pattern2>
:SearchReset