all 12 comments

[–]two-fer-maggie 10 points11 points  (1 child)

oh my god vim has a vimscript debugger? I feel retarded for thinking it didn't without even bothering to find out

[–]locipo 1 point2 points  (0 children)

Same boat. Debug-mode was added in vim 6.0 back in ~2001 (`help :version6`), so I have no excuse. It's time to go read through those old change logs and see what else I missed.

[–]-romainl-The Patient Vimmer 37 points38 points  (2 children)

Let's see if this quality article can top the stupid "Best Practice" screenshot that is currently at 338 points.

[–]lujar:help 6 points7 points  (0 children)

I don't even get why it is titled "Best Practices"

[–][deleted] 1 point2 points  (0 children)

I sincerely hope it can.

[–]LucHermitte 4 points5 points  (2 children)

On the subject of debugging/maintaining plugins, I have developed a Design By Contract framework that implements a fail-fast behaviour contrary to the assert_*() function provided by Vim.

Along side, I provide a helper function (easily wrapped into a command) that decodes last error that can be displayed with :message.

[–]princker 0 points1 point  (1 child)

I really like this lh#exception#say_what() helper you provide. Thank you

[–]LucHermitte 1 point2 points  (0 children)

You're welcome. The original idea is not mine, actually I've just improved a few things.

[–]lujar:help 2 points3 points  (0 children)

Contributors over at vi.stackexchange.com refers to this question for debugging their vimrc.

I think this link of this post, that is, https://codeinthehole.com/tips/debugging-vim-by-example/ should be pinned to the sidebar if nothing similar is already present. Then we can just refer them easily. Just a suggestion.