From a80dcc58f5738a267a737cfa99af3bef80751235 Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Sun, 14 Jun 2020 23:04:22 -0400 Subject: [PATCH] vi: Add more OpenBSD nvi settings As stated in the comment, I use vi as my $EDITOR, which means I mostly get thrown into it when I want to do a quick edit, or when I'm interacting with another program (i.e. mutt, git, etc). In these cases, I'm almost always writing prose, or doing quick code edits, so I like to have hard wrapping at 72 characters (emails, commits) and tabs expanded to spaces. --- vi/exrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vi/exrc b/vi/exrc index 9db30ab..363212b 100644 --- a/vi/exrc +++ b/vi/exrc @@ -1,4 +1,13 @@ +" .exrc -- For OpenBSD's nvi +" Mostly used for quick edits or prose (emails, commit messages, etc) +" So default to 72 hard wrapping and spaces over tabs set ruler set autoindent set searchincr set showmode +set expandtab +set shiftwidth=4 +set tabstop=4 +set wraplen=72 + +map gg 1G -- libgit2 0.28.4