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

: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.

主站蜘蛛池模板: 田林县| 方正县| 慈溪市| 眉山市| 治县。| 行唐县| 蒙阴县| 同心县| 华蓥市| 彭州市| 嘉祥县| 兴海县| 常德市| 黑山县| 库车县| 杭州市| 中西区| 东明县| 出国| 灵川县| 临潭县| 泰来县| 布尔津县| 磐石市| 凤城市| 海南省| 定安县| 乐清市| 临城县| 密云县| 白银市| 麻栗坡县| 惠东县| 徐水县| 阜平县| 嘉鱼县| 隆德县| 临猗县| 遵义市| 云浮市| 茂名市|