Coding

Search in vim

 1) Use grep

grep -R "content_to_search" /path/to/directory

grep -r --include=*.{cc,h} "hello" . OR grep hello *.h *.cc

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Consolas; color: #303336; -webkit-text-stroke: #303336; background-color: #eff0f1} span.s1 {font-kerning: none}

This reads: search recursively (in all sub directories also) for all .cc & .h files that contain "hello" at this . directory

 

2) Use find

:!find /path "keyword" // find by keyword

:!find /path -name "index.php" // find by file name

0 Bình luận

Trở về
  • HTML5 Canvas
  • HTML5 Canvas

     The <canvas> element is used to draw graphics, on the fly, on a web page. Draw a red rectangle, a gradient rectangle,...