A useful feature in many text editors is the ability to search for regular expressions in multiple files. Vim has this feature, but it is a little hard to find. Vim provides these commands for searching files: * :grep * :lgrep * :vimgrep * :lvimgrep Use of grep and lgrep depend on the external application they point to, but use of vimgrep and lvimgrep is as follows: :vim[grep][!] /{pattern}/[g][j] {file} ... For example, to search for the words "house" or "home" in all .txt files in the current directory, use: :lvim /\<\(house\|home\)\>/gj *.txt :lw
Graph IRI | Count |
---|---|
http://dbkwik.webdatacommons.org | 25 |