On line 118, execute 'normal l' screws up because I use a dvorak keyboard layout and remapped my movement to dhtn. Changing this to normal n corrected the problem, but that won't work for everyone since keybindings vary across the board
Here's my stab at refactoring it to work independently of keybindings:
function! s:SparkupNext()
" 1: empty tag, 2: empty attribute, 3: empty line
let n = search('><\/\|\(""\)\|\(^\s*$\)', 'Wp')
if n == 3
startinsert!
else
let p = getpos(".")
let p[2] = p[2] + 1
call setpos(".", p)
startinsert
endif
endfunction
If I knew how to generate a patch or figure out pull requests, I'd offer it; I hope this is satisfactory. This plugin is great, btw! I can't wait to integrate it with my workflow. Thanks for reading.
On line 118,
execute 'normal l'
screws up because I use a dvorak keyboard layout and remapped my movement to dhtn. Changing this tonormal n
corrected the problem, but that won't work for everyone since keybindings vary across the boardHere's my stab at refactoring it to work independently of keybindings:
If I knew how to generate a patch or figure out pull requests, I'd offer it; I hope this is satisfactory. This plugin is great, btw! I can't wait to integrate it with my workflow. Thanks for reading.
EDIT: corrected
execute setpos
tocall setpos
.