From 75b538b288ee44ccb159d144612cc25cc37373d2 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 26 Apr 2021 20:54:42 +0200 Subject: .vimrc: always show at least one line above/below the cursor See https://github.com/tpope/vim-sensible --- .vimrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.vimrc b/.vimrc index 89fb572..9c06c44 100644 --- a/.vimrc +++ b/.vimrc @@ -43,6 +43,16 @@ set cursorline " Highlight the cursor line and column "set statusline+=[%{strlen(&fenc)?&fenc:'none'}, " file encoding "set statusline+=%{&ff}] " file format +" Always show at least one line above/below the cursor. +" See https://github.com/tpope/vim-sensible +if !&scrolloff + set scrolloff=1 +endif +if !&sidescrolloff + set sidescrolloff=5 +endif +set display+=lastline + " maximum number of tabs to open set tabpagemax=20 -- cgit v1.2.3-54-g00ecf