English 中文(简体)
航道在维姆显示头几条缓冲线
原标题:Always display the first few lines of a buffer in Vim
  • 时间:2011-11-12 00:15:53
  •  标签:
  • vim

我经常使用gVim和Vim来查看顶级浏览器的数据表。 在通过表格其余部分浏览时,是否有办法显示这一顶流? 第1栏为“滚动”栏。

http://www.un.或g。 我接受了一个很好的答案(还有其他答案),以显示上列。

相当于接受答案一的横向(第一行)

:vert split
ctrl+w 5 |

ctrl+w v
ctrl+w 10 |

It would be nice to be able to do both, but apparently that is not straightf或ward.

最佳回答

You could open the file in two windows (command line: vim -o file file, or ctrl+w n :o file) and then one is fixed and you can scroll in the other window.

如欲见头5行新闻ctrl+w 5_

问题回答

In this case it is convenient to use the preview window (see :help preview-window). To open the preview window showing the first, say, eight lines of the current file, issue the following commands.

:set previewheight=8
:pedit +1

Use the :pclose command (:pc, for short) or the Ctrl+WZ shortcut to close the preview window.





相关问题
Autoupdate VIM Plugins?

Is it possible to update vim plugins automatically?

how to unindent in vim without leaving edit mode?

I m writing a lot of python code recently, and i used the tab-to-space mode in vim. I was just wondering how would i unindent in vim without leaving edit mode for example after i finished if...: block....

Scrolling inside Vim in Mac s Terminal

I ve been googling around trying to figure out if it s possible to use my mouse wheel to scroll while inside Vim in Mac s Terminal, with no luck. It seems as if only X11 or iTerm support this. Before ...

Vim - Deleting XML Comments

How do I delete comments in XML? If the opening and the closing comment tags are on the same line, I use :g/^<!--.*-->$/d to delete the comment. How to delete the comments that are spread ...

Limiting a match in vim to certain filetypes?

I have the following in my .vimrc to highlight lines longer than 80 chars: highlight OverLength ctermbg=red ctermfg=white guibg=#592929 match OverLength /\%81v.*/ This works quite well. However, the ...

Profiling Vim startup time

I’ve got a lot of plugins enabled when using Vim – I have collected plugins over the years. I’m a bit fed up with how long Vim takes to start now, so I’d like to profile its startup and see which of ...

热门标签