From ca517707ff80a26b89c84ced91cb8fda1f0bccf4 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Tue, 18 Aug 2020 13:49:44 +0200 Subject: [PATCH] Added spelling and heading function --- .vimrc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.vimrc b/.vimrc index 53c2a5d..ac1bf01 100644 --- a/.vimrc +++ b/.vimrc @@ -1,3 +1,16 @@ +function! FixLastSpellingError() + normal! mm[s1z=`m +endfunction + +function! MakeHeading(level) + if a:level == 1 + normal! yypVr= + elseif a:level == 2 + normal! yypVr~ + endif +endfunction + + nnoremap :echo "No left for you!" vnoremap :echo "No left for you!" inoremap :echo "No left for you!" @@ -24,7 +37,9 @@ syntax on nnoremap let mapleader=" " -map ss mm[sz=1`m +map ss :call FixLastSpellingError() +map u1 :call MakeHeading(1) +map u2 :call MakeHeading(2) filetype indent plugin on