List of VI and VIM files

I accidentally discovered feature VI during a long session, a function that I want to use, but I cannot find it in my story.

If I have a list of files ending with .property, how can I open the list of these files in vi so that they appear as a list that I can scroll down and select the correct file for editing?

I looked around in my story, but I have a million tabs open and I can’t find out how I did it!

Thanks.

+4
source share
3 answers

:e <directory containing .property files> Enter

All files in the directory will be listed here. Now you can go to the desired file and start editing.

, .property, :E Enter

+7

ctrlp.vim , , (, .git | hg | svn | bzr | _darcs), .

, , :

enter image description here

+3
:vnew|r!find . -name *.property

The above command opens a new buffer in a new vertical window and fills it with exit find. Use gfto go to the file under the cursor.

:args **/*.property
:ls

The command above recursively populates the argument list with each file ending .property. Use :lsto select a buffer for editing.

+2
source

Source: https://habr.com/ru/post/1607444/


All Articles