Search and replace in Vim across all the project files

后端 未结 11 1897
我寻月下人不归
我寻月下人不归 2020-12-07 07:00

I\'m looking for the best way to do search-and-replace (with confirmation) across all project files in Vim. By \"project files\" I mean files in the current directory, some

11条回答
  •  爱一瞬间的悲伤
    2020-12-07 07:45

    If you don't mind of introducing external dependency, I have brewed a plugin ctrlsf.vim (depends on ack or ag) to do the job.

    It can format and display search result from ack/ag, and synchronize your changes in result buffer to actual files on disk.

    Maybe following demo explains more

    ctrlsf_edit_demo

提交回复
热议问题