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

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

主站蜘蛛池模板: 古蔺县| 西城区| 蒲城县| 宁波市| 永善县| 淳化县| 叙永县| 孝感市| 通辽市| 义马市| 昌乐县| 庄河市| 布拖县| 赫章县| 西安市| 鄂尔多斯市| 连山| 鹤岗市| 多伦县| 雷波县| 张掖市| 桐城市| 托里县| 普格县| 泊头市| 陇南市| 宜川县| 泸溪县| 赤城县| 西华县| 木兰县| 双峰县| 岫岩| 桃源县| 神农架林区| 图们市| 多伦县| 股票| 科技| 平舆县| 灯塔市|