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

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

主站蜘蛛池模板: 虎林市| 灵石县| 集安市| 河东区| 临清市| 囊谦县| 安阳县| 邛崃市| 韶山市| 温泉县| 漠河县| 开封市| 雅安市| 绥中县| 六枝特区| 塔河县| 东平县| 荔波县| 吉隆县| 乌苏市| 麻江县| 岳池县| 红桥区| 连城县| 顺昌县| 广宗县| 垣曲县| 平昌县| 岳阳县| 扬中市| 丰台区| 仪陇县| 响水县| 丹凤县| 全南县| 古交市| 德钦县| 赤壁市| 瑞安市| 化州市| 巴马|