LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

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

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?

Thanks,
--Chad
 
Old 09-09-2008, 10:05 PM   #2
eagleheart
Member
 
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
Code:
ga
(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
JazzItSelf
Member
 
Registered: Oct 2003
Location: Boston
Distribution: Slackware64-current
Posts: 42

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.

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

Rep: Reputation: 59
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:

http://vim-latex.sourceforge.net/ind...q-double-quote
http://vim-latex.sourceforge.net/doc...mart-keys.html

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

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: srinath@eecs.berkeley.edu
" URL: http://vim.sourceforge.net/scripts/s...p?script_id=93
" Last Change: 2001 Dec 9

Thanks for the help guys.
--C
 
  


Reply


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


All times are GMT -5. The time now is 01:35 PM.

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