Re: Indentation file for Specman E language
- צביקה הרמתי <haramaty.zvika@...> a écrit:
> Hi.The “indentexpr” function is executed when a new line is created, but
> I've created a VIM indentation file for Specman E language.
> Please see it at:
> I've been using it for 6 months, and while it's not perfect, it seems
> to generally do the job.
> Feedbacks and suggestions are welcomed!
> Someone commented on that page, and suggested using 'indentkeys'.
> However, I don't understand how using, or not using 'indentkeys',
> would affect editing experience.
also when something matching a part of “indentkeys” is typed; for the
latter case, you should ask yourself “what kind of things should
trigger a reeindentation of the current line?”
For instance, if you’re writing this code in Vimscript:
one you’ve typed “end” you’ll want that line to be unindented, so it
matches the first one (whereas for the moment it matches the second
one, as expected by default). That is done automatically because
“indentkeys” for Vim contains “=end” (just do “:echo &indentkeys” in a
Vim file), which means “reindent whenever ‘end’ is typed”.
Note that the default value of “indentkeys” might already (partially)
suit your needs (for instance, it reindents on braces). I don’t know
Specman, so I can’t help you any further.
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@....
For more options, visit https://groups.google.com/groups/opt_out.