Email: bknpk@hotmail.com Phone: +972-54-7649119


V

 

A simple VIM function for search and delete.

  1. 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.

  2. "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

  ...




Search This Site


Feedback This Site




new pages on this site