From c7845e62d9c0d2684fe88df3df42c08869e09961 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Tue, 13 Jun 2023 14:56:35 -0400 Subject: [PATCH] Make moving lines easier in vim and change the tab listchar --- vimrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vimrc b/vimrc index 693af11..cc07727 100644 --- a/vimrc +++ b/vimrc @@ -382,7 +382,8 @@ if executable('rg') set grepprg=rg\ --vimgrep\ --hidden " Requires ripgrep to be installed. endif -set list listchars=tab:»·,trail:· " Show trailing whitespace. +" Show trailing tabs and whitespace. +set listchars=tab:»\ ,trail:·,extends:>,precedes:<,nbsp:+ set timeoutlen=250 ttimeoutlen=0 " Don't set it too low otherwise you won't be able to type use multi-key sequences. @@ -609,6 +610,10 @@ noremap :cnoremap :cnoremap +" Move a line under the cursor. +noremap :m-2 +noremap :m+ + " Window splitting - couldn't figure out how to remap v & n to " & noremap m :vsplit @@ -774,6 +779,7 @@ noremap Q "################################################################################## " MULTIPURPOSE TAB KEY "################################################################################## + fu! InsertTabWrapper() let l:col = col('.') - 1 if !l:col || getline('.')[l:col - 1] !~ '\k'