User Tools

Site Tools


tips_and_tricks:vim

Tips and Tricks : Vim

Make search results appear in the middle of the screen

When searching in Vim, it can be useful to have the text scroll so that the line with the next search hit is in the middle of the screen. That's easy with the built in commands: type n to jump to the next search hit, then zz to vertically center the line. In addition, the scrolloff option can be used to automatically scroll text into view, so that search hits always have some “context” lines before and after. For details see theVim Tips Wiki, more precisely Make search results appear in the middle of the screen.

tips_and_tricks/vim.txt · Last modified: 2020/09/09 21:57 by jupp