From ab97b4db21bb25ed6858815c7d1d807a4d3af71d Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sun, 1 Jan 2023 19:44:20 +0100 Subject: [PATCH] Added setting examples in the TL;DR --- knowledge base/vim.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/knowledge base/vim.md b/knowledge base/vim.md index 6fa835c..0ee4301 100644 --- a/knowledge base/vim.md +++ b/knowledge base/vim.md @@ -14,6 +14,18 @@ # Substitute 4-spaces indentations with tabs. :%s/ /\t/g +# Enable auto indentation per file type. +:filetype plugin indent on + +# Render existing tab as 4 spaces in width. +:set tabstop=4 + +# Insert 4 spaces of width when indenting with '>'. +:set shiftwidth=4 + +# Insert 4 spaces when indenting with 'tab'. +:set expandtab + # Align the file to the current indentation settings. :retab