www.ShoppingPodder.com

Leading Computer Shopping,
News and information


Part of the Identityscape.com network...

getxfactor.com jmoodmusic.com smartbusinesschoices.com mintdepot.com lowfaresalways.com evangelicalview.com shoppingpodder.com soproudlywehail.com webnews.ws currenthumor.com

 

 

Map :Q to :q?
   Shopping Podder - the Best of Computer Postings! Forum Index -> Computer - Editors  
View previous topic :: View next topic  
Author Message
markscottwright
Guest






PostPosted: Wed Nov 19, 2008 4:30 pm    Post subject: Map :Q to :q? Reply with quote

I often type the "q" before I've had a change to release the shift
key after typing ":". So, my quit command (":q") becomes something
meanlingless - ":Q". It seems like I should be able to map :Q to :q,
but I'm not having much luck. neither cmap nor cabbrev seem right,
since I don't want all uppercase 'Q's in command mode mapped to 'q's.

Any ideas?
Back to top
Mikolaj Machowski
Guest






PostPosted: Wed Nov 19, 2008 4:43 pm    Post subject: Re: Map :Q to :q? Reply with quote

markscottwright scripsit:
Quote:
I often type the "q" before I've had a change to release the shift
key after typing ":". So, my quit command (":q") becomes something
meanlingless - ":Q". It seems like I should be able to map :Q to :q,
but I'm not having much luck. neither cmap nor cabbrev seem right,
since I don't want all uppercase 'Q's in command mode mapped to 'q's.

Any ideas?

:command ?

m.
--
LaTeX + Vim = http://vim-latex.sourceforge.net/
Vim Universal Templates: http://vim.sf.net/script.php?script_id=1078
vim.pl - http://skawina.eu.org/mikolaj
CLEWN - http://clewn.sf.net
Back to top
canoe
Guest






PostPosted: Thu Nov 20, 2008 7:56 am    Post subject: Re: Map :Q to :q? Reply with quote

markscottwright wrote:
Quote:
I often type the "q" before I've had a change to release the shift
key after typing ":". So, my quit command (":q") becomes something
meanlingless - ":Q". It seems like I should be able to map :Q to :q,
but I'm not having much luck. neither cmap nor cabbrev seem right,
since I don't want all uppercase 'Q's in command mode mapped to 'q's.

Any ideas?

cmap Q<cr> q<cr>

canoe
Back to top
markscottwright
Guest






PostPosted: Fri Nov 21, 2008 10:37 pm    Post subject: Re: Map :Q to :q? Reply with quote

On Nov 19, 7:56 pm, canoe <n...@where.net> wrote:
Quote:
markscottwright wrote:
I often type the "q" before I've  had a change to release the shift
key after typing ":".  So, my quit command (":q") becomes something
meanlingless - ":Q".  It seems like I should be able to map :Q to :q,
but I'm not having much luck.  neither cmap nor cabbrev seem right,
since I don't want all uppercase 'Q's in command mode mapped to 'q's.

Any ideas?

cmap Q<cr> q<cr

canoe

That doesn't map all 'Q's, but it does map any 'Q' at the end of the
command line. In other words, ":w AQ" will create a file called
"Aq". Mikolaj Machowski's ":command" suggestion works better.
Back to top
Display posts from previous:   
   Shopping Podder - the Best of Computer Postings! Forum Index -> Computer - Editors  
Page 1 of 1
All times are GMT

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum