Hi, Suppose the following piece of C-code:
/* * This is a comment * It does say nothing [] The "[]" marks the current cursor position. When hitting <RET> in this situation, Mr. Cursor will jump right below the prevous lines "*" adding another "* " to continue the comment -- not knowing, that the programmer has finished the comment already and wants to start programming "real code" ;) . Would it possible (or isit already possible) to convince vim from acting as follows: Rule 1: When Mr. Cursor is positioned in a comment line of more than only a '*' and <RET> is entered, continue the comment with the next '*' Rule 2: When Mr. Cursor is positioned in a comment line containing only a '*' and <RET> is entered close the lonely '*'of the current line with a '/' and jump into the next line without adding anothe '*' Would make hacking code a little faster... Hopeing not to have invented the wheel a third time... Keep hacking! mcc