开发者

Vim: How do you open another [No Name] buffer like the one on startup?

In my Vimscript program, I need to open an add开发者_如何学运维itional Vim buffer that is not immediately associated with a file, but which the user can save to a file of her/his choosing, just like the initial buffer called [No Name]. How can I do this?


There are many ways to open a new buffer with no name, the simplest of which is :new.

:new will create a split window with an unnamed buffer.

:enew will open one in the current window.

:vnew will open one in a vertically split window.

:tabnew will open one in a new tab.


You may also want to look into :sp filename

I use split pane all of the time - it's pretty great. In combination with screen you've got a lot of niceties there.


In normal mode, type :new<CR>.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜