Wednesday, October 25, 2017

Re: Vim startup profiling

Hi Ken,
I briefly looked at your patch and have some feedback.

On Mi, 25 Okt 2017, Ken Takata wrote:

> Changes are:
> * Merge the two patches into one.
> * Update the document.
> * Rename the global variable `do_globpath_menus` to `do_lazyload_menus`.
> I'm still wondering what is the best name for this variable.
> * Remove `has('win16')`. Not needed anymore.
> * Add <silent> to the "Show File Types in Menu" item. Showing the command
> of this item is not so useful.

+If you want to have all these items already present at startup, add: >
+ :let do_lazyload_menus = 1

I think this variable should either be called `do_no_lazyload_menus` or
the value should be 0, since by default the menus will be lazy loaded.

+ let n = globpath(&runtimepath, "colors/*.vim")

I think that should be

+ let n = globpath(&runtimepath, "colors/*.vim", 1, 1)

So you have a list available already and don't need to split later on
manually and you probably do want to ignore the suffixes and wildignore
options, if only the user having set them to bad values.

The same holds for the keymap and compiler runtime files.

+ augroup SetupLazyloadMenus
+ au!
+ au CursorHold,CursorHoldI * call <SID>SetupLazyloadMenus() | au! SetupLazyloadMenus
+ augroup END

Is this actually a good idea to delete the augroup from within itself?

BTW: there are many runtime file variables. Perhaps we should start to
document internal runtime file variables in a help file at a central
place.

Also I am starting to wonder, whether it would make sense to start using
a common prefix, so that the names are more consistent and less likely
to clash with user variables, e.g. something like
vim_ftplugin_undo
vim_indent_undo
vim_menu_init_immediate

Christian
--
Neuer MS-Slogan:
Speicherst Du noch oder fluchst Du schon?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: