1, Verification
http://www.ovmworld.org/
2, English Learning
http://english.cctv.com/program/travelogue/01/index.shtml
http://www.cctv.com/program/travelogueold/01/index.shtml
http://www.chinadaily.com.cn/index.html
http://bogglesworldesl.com/
http://www.eslpod.com/website/index_new.html
3, Traveling
http://www.9588.com/
4, entertainment
Snoopy: http://comics.com/peanuts/
5, Linux
http://ss64.com/bash/
http://www.comptechdoc.org/
http://www.comptechdoc.org/os/linux/commands/index.html
2009年12月3日星期四
vi tips
1, exchange uppercase from/to lowercase:
~ guw gUw g~w
10~ guu gUU g~~
2, fold
+v to select multiple lines, then zf;
on[]{}(), zf%
zo
~ guw gUw g~w
10~ guu gUU g~~
2, fold
on[]{}(), zf%
zo
Some useful commands
1, Multiple Files Search and Replace:
perl -pi -w -e 's/search/replace/g;' *.txt
2, unzip and tar:
gunzip -c foo.tar.gz | tar xopf -
or,
tar xzvf foo.tar.gz
3, disk usage
du -sh "/vws/rqj/*"
df -h
4, show difference between versions in Clearcase.
vt ct diff filename@@/main/1 filename@@/main/2
5, Enable copy&paste for VNC
vncconfig -nowin &
perl -pi -w -e 's/search/replace/g;' *.txt
2, unzip and tar:
gunzip -c foo.tar.gz | tar xopf -
or,
tar xzvf foo.tar.gz
3, disk usage
du -sh "/vws/rqj/*"
df -h
4, show difference between versions in Clearcase.
vt ct diff filename@@/main/1 filename@@/main/2
5, Enable copy&paste for VNC
vncconfig -nowin &
my .cshrc and vi configuration.
1, alias in .cshrc
alias setprompt 'set prompt="[`pwd`]"'
setprompt
alias cd 'chdir \!* && setprompt'
alias ll 'ls -l'
alias rm 'rm -i'
alias vii 'gvim'
2, .vimrc
" Added by Leon Liang.
"----------------------------------------------------------------
syntax on " turn on highlight
set hlsearch " highlight the searching word
set autoindent " always set autoindenting on
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
set number
set wrap
set linebreak
set shiftwidth=4
set cmdheight=2
colo torte
"set expandtab "expand tab to n*blank
set tabstop=3
set expandtab
" or,
"autocmd FileType vera set tabstop=4
"autocmd FileType vera set expandtab
"autocmd FileType verilog set tabstop=4
"autocmd FileType verilog set expandtab
"autocmd FileType verilog_systemverilog set tabstop=4
"autocmd FileType verilog_systemverilog set expandtab
function FileHeading_perl()
let s:line=line(".")
call setline( s:line,"#############################################################################"
call append( s:line,"# File name: ")
call append(s:line+1,"# Author: Leon Liang")
call append(s:line+2,"# Date: ".strftime("%b %d %Y %H:%M:%S"))
call append(s:line+3,"# Description: ")
call append(s:line+4,"# ")
call append(s:line+5,"#############################################################################"
unlet s:line
endfunction
:autocmd BufNewFile *.pl execute FileHeading_perl()
iabbr fhpl:execute FileHeading_perl()
autocmd FileType verilog_systemverilog iabbr begin begin//{
autocmd FileType verilog_systemverilog iabbr end end//}
3, add following lines to .vim/filetype.vim for file type detection.
" Verilog HDL
au BufNewFile,BufRead *.v *.vh setf verilog
" SystemVerilog HDL "Added by Leon Liang.
au BufNewFile,BufRead *.sv,*.svh setf sverilog
"Note: download sverilog.vim from internet and put it in .vim/syntax/
alias setprompt 'set prompt="[`pwd`]"'
setprompt
alias cd 'chdir \!* && setprompt'
alias ll 'ls -l'
alias rm 'rm -i'
alias vii 'gvim'
2, .vimrc
" Added by Leon Liang.
"----------------------------------------------------------------
syntax on " turn on highlight
set hlsearch " highlight the searching word
set autoindent " always set autoindenting on
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
set number
set wrap
set linebreak
set shiftwidth=4
set cmdheight=2
colo torte
"set expandtab "expand tab to n*blank
set tabstop=3
set expandtab
" or,
"autocmd FileType vera set tabstop=4
"autocmd FileType vera set expandtab
"autocmd FileType verilog set tabstop=4
"autocmd FileType verilog set expandtab
"autocmd FileType verilog_systemverilog set tabstop=4
"autocmd FileType verilog_systemverilog set expandtab
function FileHeading_perl()
let s:line=line(".")
call setline( s:line,"#############################################################################"
call append( s:line,"# File name: ")
call append(s:line+1,"# Author: Leon Liang")
call append(s:line+2,"# Date: ".strftime("%b %d %Y %H:%M:%S"))
call append(s:line+3,"# Description: ")
call append(s:line+4,"# ")
call append(s:line+5,"#############################################################################"
unlet s:line
endfunction
:autocmd BufNewFile *.pl execute FileHeading_perl()
iabbr fhpl
autocmd FileType verilog_systemverilog iabbr begin begin//{
autocmd FileType verilog_systemverilog iabbr end end//}
3, add following lines to .vim/filetype.vim for file type detection.
" Verilog HDL
au BufNewFile,BufRead *.v *.vh setf verilog
" SystemVerilog HDL "Added by Leon Liang.
au BufNewFile,BufRead *.sv,*.svh setf sverilog
"Note: download sverilog.vim from internet and put it in .vim/syntax/
订阅:
博文 (Atom)