I thinking of mapping single quotation mark to double quotation mark i.e ' -> " in my vimrc.
Besides declaring chars in C, where is ' is used in programming?
Should I map it?
I’ll reverse map them to access both.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Single quotes are used all over the place in programming.
In the Bourne shell (and derivatives, and
cshand derivatives, andPerland other languages) it is used to inhibit string exansion, so you can do this:In
C, the single quote is used to denote a character constant, rather than a string. So you can do this:But this is an error:
And of course if you are programming in a language called “English”, the single quote is used to denote important things like possessives (“snihalani’s question seemed sort of odd) as well as contractions (“I can’t believe anyone would want to do this.”).
These are just a few examples. There are, of course, more.