Kevin Ushey wrote: > syntax/sh.vim currently has (from > https://github.com/vim/vim/blob/e1c8c7a6742be6072290f9aa54ae358060d9c42f/runtime/syntax/sh.vim#L91-L98): > > " set up the syntax-highlighting iskeyword > if has("patch-7.4.1142") > if exists("b:is_bash") > exe "syn iskeyword ".&iskeyword.",-,:" > else > exe "syn iskeyword ".&iskeyword.",-" > endif > endif > > I wonder if this should also include something like > > exe "set iskeyword=" . &keyword . ",-" > > so that bash functions that contain a `-` are properly indented, as well? > (The shell indentation vimscript appears to use the \k keyword class when > detecting keywords, and that fails for functions which contain a '-', > assuming I understand what's going on in there correctly.) > > https://github.com/vim/vim/blob/e1c8c7a6742be6072290f9aa54ae358060d9c42f/runtime/indent/sh.vim#L76
If it's about indenting it should be in the indent script, not the syntax one. Changing 'iskeyword' has many side effects. That's why we have "syn iskeyword". There are no specific indent commands, thus for indenting it's up to the script to do this properly, hopefully without touching 'iskeyword'. It could save, change and restore it. -- hundred-and-one symptoms of being an internet addict: 241. You try to look for Net Search even when you're in File Manager. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
