[root@localhost ~]# vim testfile.txt
# go to the execution mode of vim
:%s/keyword/neword/ig
#option i is use for ignore case
#option g is use for global search
#only draw back is this will not match exact keywork you use this as
:%s/\<keywork\>/newword/ig
#this will match exact keyword and replace with new.
# go to the execution mode of vim
:%s/keyword/neword/ig
#option i is use for ignore case
#option g is use for global search
#only draw back is this will not match exact keywork you use this as
:%s/\<keywork\>/newword/ig
#this will match exact keyword and replace with new.
No comments:
Post a Comment