A simple VIM function for search and
delete.
-
An example for a VIM function, which searches a given string. If the string
is found, it is deleted. The function can be added to ~/.gvimrc or sourced,
when needed.
-
"search the string from file start, if found remove it
"usage :call RmStr("put here any string")
fun RmStr(s)
call cursor(1, 1)
let l = search(a:s, "W")
if l > 0
delete
endif
endfunction
|