Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-09-2008, 04:24 PM   #1
Registered: Oct 2003
Location: Boston
Distribution: Slackware64-current
Posts: 44

Rep: Reputation: 18
gvim - double quote char always replaced with two single quotes in special modes

Hey all-

I feel really dumb having to ask this, but like the subject says when I'm using gvim (7.0.109) every time I type the " (double quote) character it is replaced with two ' (single quote) characters.

This happens to me when editing my .vimrc and when I'm in the latex, c++, bash scripting, and probably other modes although these are the only ones I've tried. It does NOT happen in plain text mode!

I've checked to make sure that the key isn't mapped with the :map command.

Ideas? What else should I look for?

Old 09-09-2008, 10:05 PM   #2
Registered: Apr 2007
Location: Athens, Georgia, USA
Distribution: kubuntu 12.04, centos 6.3
Posts: 31

Rep: Reputation: 16
Put your cursor on one of these single quote pairs and type
(in command mode of course)

..or do they really take up two columns? ok, do that for one of the pair.

What appears in the command area (character, decimal, hex, octal)?
Old 09-15-2008, 11:00 PM   #3
Registered: Oct 2003
Location: Boston
Distribution: Slackware64-current
Posts: 44

Original Poster
Rep: Reputation: 18
they really take up two columns!

ga results in:
<`> 96, Hex 60, Octal 140

for both... not surprisingly. In the tex mode this is referred to as "smart quotes" I think, and there's a variable that you are supposed to be able set to turn it off, but I've had no luck with this. Plus, I'm not in tex mode.

Old 09-16-2008, 12:12 AM   #4
Mr. C.
Senior Member
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
vim under normal circumstances does not replace a double quote with two single quotes. I've been using vim for as long as it has been around and haven't encountered this in any file format I've used. I rarely use gvim, so there may be some setting different between our usages.

This would be some extension or plug in that is running based on the file type. See if this helps:

Last edited by Mr. C.; 09-16-2008 at 12:13 AM.
Old 09-16-2008, 11:26 AM   #5
Registered: Oct 2003
Location: Boston
Distribution: Slackware64-current
Posts: 44

Original Poster
Rep: Reputation: 18
This is happening in both gvim and vim.

Thanks for the two links, but I've actually already tried that solution, and it doesn't seem to work!

I did however finally figure it out. It turns out that I had added a set of tex macros that doesn't respect the b:Tex_SmartKeyQuote and g:Tex_SmartKeyQuote flags, and infact, doesn't even respect what mode the buffer is in. For reference, this is the macro's info:

" LaTeX filetype plugin
" Language: LaTeX (ft=tex)
" Maintainer: Srinath Avadhanula
" Email:
" URL:
" Last Change: 2001 Dec 9

Thanks for the help guys.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with quotes and double quotes Andruha Slackware 6 01-02-2010 04:44 PM
minicom won't send a double quote character kscott121 Linux - Software 0 05-22-2008 02:34 PM
Using single quotes vs double quotes in PHP strings vharishankar Programming 6 07-11-2005 11:41 AM
Double and single quote, Question in expect evilchild Programming 4 08-22-2004 05:34 PM
In BASH shell, what is the difference in usage between single and double quotes? davidas Linux - Newbie 2 04-05-2004 03:00 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration