Posts

Showing posts from September, 2009

my ~/.vimrc

set nonumber      " we don't need line numbers on the left, because we have status line set laststatus=2  " always show the status line set statusline=%<%F%h%m%r%h%w%y\ %=\col:%c%V\ line:%l\,%L\ %P set hlsearch set incsearch set ignorecase set showmatch set matchtime=3 set softtabstop=2 set shiftwidth=2 set tabstop=2 set expandtab set noautoindent smartindent set bg=dark set paste set pastetoggle=<F2>

Editing multiple lines in vim

1.Press ctrl + v (To selest visual block. v/V are for visual region) 2.Select lines you want to append to. 3.Press I{string}<ESC> (Note: Its I = capital i = shift+i) In our case, {string} = #. It takes a while for changes to appear after you press <ESC>.

Searching using/in URL bar

1. Go to any site which you use for searching (e.g. Wikipedia). 2. Right click on text box where you enter your query. 3. Click on "Add a keyword for this search". 4. Enter <keyword>(e.g. wk) in keyword box. 5. Save. Whenever you want to search 'something' in Wikipedia, just type 'wk something' in URL bar. If search doesn't work, try to analyse and modify location field.

'rename' command

To rename multiple files: I wanted to rename all files in a folder from *_vXXX.sh to *_vYYY.sh. Thus I used rename XXX YYY *_vXXX.sh We can specify the number of wild characters in searching pattern by ? e. g. reaplce only a_vXXX.sh but not ab_vXXX.sh rename XXX YYY ?_vXXX.sh

'ndiswrapper' on fedora 11

Again this might change with newer version of OS or different version of OS. rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stabl yum install kmod-ndiswrapper mkdir ~/new_installation/ndiswrapper_driver cd ~/new_installation/ndiswrapper_driver wget http://www.jbg.f2s.com/bcm43.bz2 tar jxvf bcm43.bz2 cd bcmwl5\ driver ndiswrapper -i bcmwl5.inf Now reboot your machine and execute these commands. modprobe ndiswrapper ndiswrapper -ma

Installing GUI on a non-GUI/Command line terminal

We need to execute 2 packages as opposed to google's result. yum -y groupinstall "X Window System" "GNOME Desktop Environment"