From 7a5c898621b8d6817eea4a262041a07e03731e9c Mon Sep 17 00:00:00 2001 From: druckdev <63563978+druckdev@users.noreply.github.com> Date: Mon, 26 Oct 2020 13:38:09 +0100 Subject: [PATCH] vim: Autoindent new lines This option is not set in vanilla vim by default. --- .config/vim/vimrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/vim/vimrc b/.config/vim/vimrc index 6679b6c..9350bd7 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -28,6 +28,10 @@ set cursorline " new lines and delete it when joining; do not break already too long lines; " allow formatting with gq. set formatoptions=tcroqlj +" Autoindent new lines +set autoindent +" Copy structure of the existing lines indent when autoindenting a new line +set copyindent " Keep lines under 80 characters. set textwidth=80 " Do not insert two spaces before a new sentence when formatting @@ -51,8 +55,6 @@ else nmap cw dwi nmap cW dWi endif -" Copy structure of the existing lines indent when autoindenting a new line -set copyindent " Show ruler at 80 and 100 columns set colorcolumn=80,100 " Show menu for possible matches when using command-line completing.