I notice an annoying stutter when opening directories. Just a split second, but it's kind of a problem if I'm navigating the directory tree and it hesitates each time I open a different directory.
I thought it might be double-loading something so to debug, I put the following in
if !exists('s:count') let s:count = 0 endif let s:count += 1 func! Count() echo s:count endf
<leader>j to call
If I open a file in vim, and run
:edit %:h, a netrw buffer opens with the file's containing directory as expected. The
s:count is 2, so my ftplugin was indeed double-loaded. Hitting Enter on a listing to edit that file increments
s:count by 1 more.
It's consistent: every time navigate into a directory-buffer,
s:count increments by 2, every time I navigate down the file-tree,
s:count increments by 1. This also means that if move down the tree into a subdirectory, it increments by 3.
Is this a good indicator that something is loading more times than necessary, and if so how might I fix it?