From 18b5126a323bc8ee97165ad1c656ca6e5ddb5387 Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Sun, 26 Feb 2023 11:52:29 +0100 Subject: [PATCH] Vim config section --- content/rambles/vim.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/content/rambles/vim.md b/content/rambles/vim.md index 162c7d3..91c6398 100644 --- a/content/rambles/vim.md +++ b/content/rambles/vim.md @@ -52,18 +52,25 @@ In NeoVim terminals are handled significantly worse and is the main reason I wen ## Tips Something I came across some time ago is that you can interpet the current line with whatever you want using + ``` :.! ``` + So for instance running... + ``` :.!bash ``` + ...while highlighting the line... + ``` bash echo Line{1..5} | sed 's/ /\n/g' ``` -...will result in: + +...will result in: + ``` Line1 Line2 @@ -71,3 +78,26 @@ Line3 Line4 Line5 ``` + +# Configuration + +Some settings I like putting in my git configuration files. +```vimrc +set nocompatible +set termguicolors +set cursorline +set hlsearch +set ignorecase +set smartcase +set number +set relativenumber +set wildmeny +set mouse= +set scrolloff=3 +set listchars=tab:│\ ,lead:·,trail:·,eol:¬ "'lead' is a NeoVim specific option +set list + +" I haven't tried if this works in base vim. +match ExtraWhitespace /\s\+$/ +highlight ExtraWhitespace guifg=red +```