Hacker News new | ask | show | jobs
by hhhhhhhhh 5079 days ago
in vim A (capital!) jumps to the end of the line in insert mode and semicolons get in the way

this is literally the only objective reason i have ever seen for using/not using semicolons

1 comments

Hacked this together in a couple seconds, there is probably a better way:

    nnoremap A :call EndOfLine()<CR>a

    fu! EndOfLine()
        normal $
        if getline(".")[col(".")-1] == ';' 
            normal h
        endif
    endfunction