summaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2021-04-26 20:54:42 +0200
committerTobias Klauser <tklauser@distanz.ch>2021-04-26 20:55:37 +0200
commit75b538b288ee44ccb159d144612cc25cc37373d2 (patch)
tree43b5bd989ec4288156a54fd81eae4118ca39e89c /.vimrc
parent564c13d625df8744b3bac767a2607d45fd22611c (diff)
.vimrc: always show at least one line above/below the cursor
See https://github.com/tpope/vim-sensible
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc10
1 files changed, 10 insertions, 0 deletions
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