官术网_书友最值得收藏!

:e with wildmenu enabled

Another way to explore file trees is to use the set wildmenu option in your .vimrc file. This option sets an autocomplete menu to operate in enhanced mode, showing possible autocomplete options above the status line. With wildmenu enabled, type in :e (followed by a space) and hit Tab. This will bring up a list of files in the current directory, and you can use the Tab key to iterate through these and Shift Tab to move backward (the left and right arrow keys perform the same function):

Pressing Enter will open the selected file or directory. The down arrow allows you to drill down into directory under cursor, and the up arrow takes you back up a level.

This also works with partial paths, and entering :e <beginning_of_filename> followed by a Tab key invokes wildmenu as well.

My .vimrc file has the following in it:

set wildmenu                    " Enable enhanced tab autocomplete.
set wildmode=list:longest,full " Complete till longest string,
" then open the wildmenu.

This allows you to autocomplete the path to the longest match possible (and display a list of possible completion options) on a first Tab press, and traverse through files with wildmenu on a second Tab press.

主站蜘蛛池模板: 页游| 保亭| 策勒县| 炉霍县| 昌平区| 佛学| 南乐县| 东台市| 怀化市| 祁连县| 新兴县| 交口县| 广南县| 涞水县| 资阳市| 平乐县| 阳曲县| 南昌县| 叶城县| 五家渠市| 广饶县| 上林县| 天长市| 曲阜市| 洛川县| 兴业县| 平安县| 保康县| 开阳县| 永仁县| 弥渡县| 湛江市| 灯塔市| 建始县| 平邑县| 都兰县| 封丘县| 安泽县| 桦南县| 林芝县| 福鼎市|