I’ve switched over to vim for quite a while now (over a year now, I think), after being a die-hard gedit user. My productivity has gone way up since, but there’s always been something that’s bugged me: When you press
12345678910111213 function s:toggle_home()let l:old_col=col(".")normal ^let l:new_col=col(".")if l:old_col == l:new_colnormal 0endifendfunctionif !exists("ToggleHome")command -nargs=0 ToggleHome :call s:toggle_home()endif</blockquote>Putting that script in your ~/.vim/plugin directory, and then mapping it with
123 map <home> :ToggleHome<cr>imap <home> <c-o>:ToggleHome<cr></blockquote>gives me my desired behaviour 🙂 It’s a pretty naive script, but it does the job.
]]>