frankvw
October 21st, 2009, 11:32 AM
Hi,everyone,
I'm sure this is simple but it drives me bats.
I have vim 1:7.1.314 installed on Intrepid. Which works fine, except that its default behavior is to repeat comments when I edit php files. When a line starts with a double slash ('//') to denote a PHP comment, vim will place the double slash on the next line too when I hit enter. Meaning that when I paste a PHP snippet that contains a comment somewhere, I end up with garbage.
I tried to edit /etc/vim/vimrc to enable 'compatible' mode, but that broke the showing of matching brackets (which could not be turned on again) and worse, it reduces the 'undo' function ('u' key) to one level only.
I tried to enable syntax highlighting, but that causes vim to spout errors when I try to edit a PHP file (something that seems to be related to errors in /usr/share/vim/vim71/syntax/php.vim).
Suggestions anyone? I need to stop vim from inserting comment delimitors, but without breaking the multi-level undo, and preferably without breaking the matching brackets feature too. On top of that syntax highlighting without errors would be great, too, but the unwanted insertion of comment delimitors is the critical issue here.
All suggestions would be greatly appreciated!
// FvW
I'm sure this is simple but it drives me bats.
I have vim 1:7.1.314 installed on Intrepid. Which works fine, except that its default behavior is to repeat comments when I edit php files. When a line starts with a double slash ('//') to denote a PHP comment, vim will place the double slash on the next line too when I hit enter. Meaning that when I paste a PHP snippet that contains a comment somewhere, I end up with garbage.
I tried to edit /etc/vim/vimrc to enable 'compatible' mode, but that broke the showing of matching brackets (which could not be turned on again) and worse, it reduces the 'undo' function ('u' key) to one level only.
I tried to enable syntax highlighting, but that causes vim to spout errors when I try to edit a PHP file (something that seems to be related to errors in /usr/share/vim/vim71/syntax/php.vim).
Suggestions anyone? I need to stop vim from inserting comment delimitors, but without breaking the multi-level undo, and preferably without breaking the matching brackets feature too. On top of that syntax highlighting without errors would be great, too, but the unwanted insertion of comment delimitors is the critical issue here.
All suggestions would be greatly appreciated!
// FvW