From e539bb663db349e52f6ed258a804f4c7d8e6cf32 Mon Sep 17 00:00:00 2001 From: yannickreiss Date: Sun, 12 May 2024 22:02:26 +0200 Subject: [PATCH] Easily swapping two words with ,lw --- viml/automacro.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/viml/automacro.vim b/viml/automacro.vim index 7858399..35de3b6 100644 --- a/viml/automacro.vim +++ b/viml/automacro.vim @@ -6,4 +6,12 @@ function SpacedLine() normal j endfunction +function SwapWords() + normal dw + normal e + exec 'normal! a ' + normal p +endfunction + nnoremap o :call SpacedLine() +nnoremap ls :call SwapWords()