Unfortunately, what I suspect is a related characteristic is not so great. Several times now I've been editing a line that begins with a multiply symbol, "*", separated by a space from the variable name that follows. When I press Enter I get a multiply symbol at the start of the next line. This isn't a major annoyance when I'm entering new code because it's readily noticeable, but when I'm reformatting existing code it's very easy to overlook and can create some highly unwanted results. Recently this happened and I didn't catch it. The result was an infinite loop that cost about two man-days to find.
Here's an example:
someVariable = (someOtherVariable + stillSomeOtherVariable)
* (someOtherVariable - stillSomeOtherVariable)
* - someVariable * someOtherVariable;
^
^
Vim inserted the leading '*' automagically
Does anyone know if there's a way to limit the automatic insertion of characters at the beginning of a line to just the comment sequence? Short of that, maybe somebody knows what setting controls this behavior?
-- Jay
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
No comments:
Post a Comment