在Macvim拆分窗口中拖放打开文件?

时间:2010-05-01 11:59:54

标签: text-editor vim macvim

我喜欢在Vim中使用分割窗口功能。但是我似乎无法将新文件拖放到不同的部分。这样做只会打开一个新选项卡。我不喜欢使用标签,因为我仍然需要在它们之间轻弹,与使用单独的窗口没什么不同。

无论如何我可以改变这种行为吗?它在Windows gVim和Im上运行正常,使用相同的vimrc文件。

1 个答案:

答案 0 :(得分:3)

从文档(:help macvim-drag):

Dragging files and dropping them on a window opens those files in tabs in that
window, unless Vim is in command-line mode.  In command-line mode the names of
the files are added to the command line.  Holding down modifier keys whilst
dragging is not supported.

If a file is dropped on the Dock icon, it is always opened in a new tab
regardless of the mode Vim is currently in.  The same holds if you
double-click on a file in the Finder.

The "Open files from applications" preference in the General preference pane
gives more options on how dropped files should open, in case tabs are not
desired.