Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Easy way to find unmatched quote in vim?

Tags:

vim

debugging

I'm writing a ksh script and apparently have an unmatched double quote (") in my code. Ksh unfortunately just tells me that the last line of the script doesn't match it, but the error is almost certainly well before the end of my script. I'm writing this in VIM. Is there some way I can narrow down where the actual quote issue is?

like image 202
C. Ross Avatar asked Jan 28 '11 15:01

C. Ross


1 Answers

Probably go to the end (G$) and search for a double quote backwards (?")

Otherwise, lookup for lines with only one double quote (/^[^"]*"[^"]*$) could help if your script is simple.

like image 192
Benoit Avatar answered Oct 10 '22 12:10

Benoit