Hello Bram, hello folks, (cc'ing vim dev) if this already has been discussed excuse me. Some time ago we had a discussion about how to handle specific settings in Vim the correct way. Now some time later i think i have a approach that could be of some use in this regard. example code follows:
^------------------------------------------------------------------------------- " Make sure compatible-options is [re]set to vim defaults. " Vim default: "aABceFs". Commas can be added for readability. set cpo&vim " set cpo to your likings e.g: set cpo+=y if exists("g:global_cpoptions_save") unlockvar g:global_cpoptions_save endif let g:global_cpoptions_save = &cpo lockvar g:global_cpoptions_save autocmd SourcePre * let &cpo = g:global_cpoptions_save \| set isfname&vim \| set isident&vim \| set iskeyword&vim \| set isprint&vim ^------------------------------------------------------------------------------- Now this code isn't perfect neither as all other aproaches. Still it has benefits: parallelises instead of serialisation, means: The current approach of handling cpo serialize each and every runtime file. Results: if only one of the runtime files handles cpo wrongly the whole process will fail resulting in non wanted cpo settings at runtime (note some runtime files even modify cpo on their own and cpo is global only). With the approach above each runtime file will get the same terms at startup and the whole process will only fail, if the LAST runtime file being processed breaks. IMHO this lifts much of the burden. Now if we only had a 'au SourcePost'..... -- Regards, Thilo 4096R/0xC70B1A8F 721B 1BA0 095C 1ABA 3FC6 7C18 89A4 A2A0 C70B 1A8F -- You received this message from the "vim_dev" 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