How to effectively work with multiple files in Vim

前端 未结 28 2663
甜味超标
甜味超标 2020-11-28 00:18

I\'ve started using Vim to develop Perl scripts and am starting to find it very powerful.

One thing I like is to be able to open multiple files at once with:

<
28条回答
  •  情深已故
    2020-11-28 00:47

    Many answers here! What I use without reinventing the wheel - the most famous plugins (that are not going to die any time soon and are used by many people) to be ultra fast and geeky.

    • ctrlpvim/ctrlp.vim - to find file by name fuzzy search by its location or just its name
    • jlanzarotta/bufexplorer - to browse opened buffers (when you do not remember how many files you opened and modified recently and you do not remember where they are, probably because you searched for them with Ag)
    • rking/ag.vim to search the files with respect to gitignore
    • scrooloose/nerdtree to see the directory structure, lookaround, add/delete/modify files

    EDIT: Recently I have been using dyng/ctrlsf.vim to search with contextual view (like Sublime search) and I switched the engine from ag to ripgrep. The performance is outstanding.

    EDIT2: Along with CtrlSF you can use mg979/vim-visual-multi, make changes to multiple files at once and then at the end save them in one go.

提交回复
热议问题