Updated vim macros
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 22s
Some checks failed
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 22s
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
" various tools inside vim
|
||||
function! GetCharUnderCursor()
|
||||
let line = getline('.')
|
||||
let col = col('.')
|
||||
return line[col - 1]
|
||||
endfunction
|
||||
|
||||
" predefined macros in functions
|
||||
function SpacedLine()
|
||||
normal o
|
||||
@@ -11,7 +18,15 @@ function SwapWords()
|
||||
normal e
|
||||
exec 'normal! a '
|
||||
normal p
|
||||
normal l
|
||||
let char = GetCharUnderCursor()
|
||||
if char == ' '
|
||||
normal x
|
||||
endif
|
||||
normal h
|
||||
normal b
|
||||
normal b
|
||||
endfunction
|
||||
|
||||
nnoremap <leader>o :call SpacedLine()<CR>
|
||||
nnoremap <leader>ls :call SwapWords()<CR>
|
||||
let @o = ':call SpacedLine()
|
||||
'
|
||||
|
||||
Reference in New Issue
Block a user