Tuesday, November 14, 2006

vi quick reference

ESC , then ":": command mode
Move :
h left one character
l right one character
k up one line
j down one line

b back one word
f forward one word
{ up one paragraph
} down one paragraph
$ to end of the line

^B back one page
^F forward one page
17G to line #17
G to the last line

Insert :
i just before the current cursor position
a just after the current cursor position
o into a new line below current cursor
I
at the beginning of the current line
A at the end of the current line
O into a new line above current cursor
search : /
replace : r, R
replace (global) : %s/old/new/g
change : c, C
>> Copy current line     yy  or Y
>> Copy a word yw
>> Copy 4 words y4w or 4yw
>> Paste after cursor p
>> Paste before cursor P
>> Move current line after line 5 :m 5
>> Move line x after line 5 :xt 5
>> Move line 9 after line 5 :9t 5
>> Undo last modification u
>> Undo all changes on a given line U
>> Global search and replace --> :1,$ s/old/new/g
>> Insert file at cursor position --> :r filename


Capitalize the first letter of each word from line #26 through the end of the file --> :26,$s/\<[a-z]/\U&/g Multi file editing

vi can manipulate more than one file at the same time, therefore to edit three files in sequence, type:
vi one two three
To detect which file is currently edited use the ex ar (args) command:
:ar
that types file list and flags current file at screen bottom as follows:
one [two] three

:w write file with the following message at screen bottom:

"vi_ex.doc" 670 lines, 27747 chars
ZZ terminate current editing with the following message at screen bottom:

2 more files to edit

To move along files in the list:


vi Multifile Moving Commands
:n edit next file in the list
: Nn advance n files in the list
~ toggle between the two last files
:e# reopen previous file, same as above
e file re-edit from disk
:rew rewind file pointer to first file
:rew! force rewind and immediatly reopen first file
:ar list file names




compiz beryl

compiz beryl
1. AIGLX with nvidia driver native support, compiz-free-desktop

2. GLX with nvidia driver , beryl-manager

nvidia glx driver

Toshiba 5100 has a Nvidia 440 go GPU(NV17).
nvidia glx driver
87.76
71.84
96.29

vmplayer for VPN

widnows 2000 in VMPlayer.
Nortel

Upgrade to Ubuntu edgy eft

From dapper, moved to Edgy.

Update is very simple and easy.

1. Change the /etc/apt/sources.list
in the repository list, change all "dapper" to "edgy"

If you use vi, type following in command mode.

:%s/dapper/edgy/g

It's done!!

2. update the repository list with
$ sudo apt-get update

3. just type upgrade and give a long time to system.
$ sudo apt-get dist-upgrade


At my case, It takes about 5 hours.
here's my new upgrade 2.6.17 kernel.

jn@satellite:~$ uname -a
Linux satellite 2.6.17-10-386 #2 Fri Oct 13 18:41:40 UTC 2006 i686 GNU/Linux