Thursday, May 26, 2022

[SOLVED] Double quotes in vim/ubuntu?

Issue

I apologize profusely for the incredibly newbish question I'm about to ask, but for some reason, my brain's locked up:

I'm trying to code in C on gvim on a virtual machine running Ubuntu, but my Hello World throws compiler errors which I suspect has to do with the quotes being different ascii(unicode?) codes than standard quotes. It doesn't recognize "Hello World" as a string and says "stray \250 in program" as well as "stray \302 in program" each twice.

To type a double quote, I have to hold down Shift and double-tap the quote key. This seems to be a global setting for all programs (terminal, open office, etc.)

Am I correct in assuming it's a problem with quotes, and if so, would any of you happen to know a solution to my problem?


Solution

It sounds like you've got the wrong keyboard map set up. I got the same symptoms as you with a "UK (international with deadkeys)" keyboard map. Changed it to a standard UK one and it worked fine.

HTH

Rob



Answered By - RobS
Answer Checked By - Katrina (WPSolving Volunteer)