开发者

How can I have a permanent status line showing the name of the current file?

I keep on forgetting which file I'm editing.

开发者_JAVA技巧

In Vim 7.x, how can I have a permanent status bar at the bottom (like what is displayed when I press Ctrl+G) showing the current file name I'm editing?


From the manual, you're really just wanting:

set laststatus=2
set statusline=%f "tail of the filename

As an aside: if you're wanting a status line with a ton more information be sure to check out this link. It'll give you something a bit more fancier like so:-

How can I have a permanent status line showing the name of the current file?


You can use Ctrl+g to print the current file name along with the cursor position and the file status.

To permanently show the current filename (and much more) in the statusline, you can use the vim-airline plugin. By default, the statusline will look similar to this:

How can I have a permanent status line showing the name of the current file?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜