From 95d5a8ef0a37ee3cf8862c99d08dbe892503d2af Mon Sep 17 00:00:00 2001 From: Felix Wittwer Date: Wed, 22 Jun 2022 14:14:09 +0200 Subject: [PATCH] Set scroll-offset to keep context visible --- entropy/.vimrc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/entropy/.vimrc b/entropy/.vimrc index 35a43b5..851256b 100644 --- a/entropy/.vimrc +++ b/entropy/.vimrc @@ -79,10 +79,6 @@ set backspace=indent,eol,start " map the leader key to , let mapleader="," -" set filetypes -au BufRead,BufNewFile *.ohuac setfiletype rust -au BufRead,BufNewFile *.ohuao setfiletype json - " Cycling through windows and tabs -- made by Pius :D " nnoremap j " nnoremap k @@ -122,6 +118,9 @@ set tabstop=4 set shiftwidth=4 set expandtab +" keep 5 lines of context above/below the cursor (if possible) +set scrolloff=5 + " Search set hlsearch " Highlight all search results set smartcase " Enable smart-case search