Search This Blog

27 May, 2011

vim editor string manipulation, replace string

Every occurrence in file
:%s/<OLD STRING>/<NEW STRING>/g

Change <OLD STRING> to <NEW STRING>, but ask for confirmation first.

:%s/<OLD STRING>/<NEW STRING>/gc


change string between a particular line number
:123,567s/<OLD STRING>/<NEW STRING>/gc

No comments:

Post a Comment

tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf setw -g mouse on save the file and exit from the tmux shell, you should be able to use your mouse to ...