| View previous topic :: View next topic |
| Author |
Message |
markscottwright Guest
|
Posted: Wed Nov 19, 2008 4:30 pm Post subject: Map :Q to :q? |
|
|
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
|
Posted: Wed Nov 19, 2008 4:43 pm Post subject: Re: Map :Q to :q? |
|
|
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
|
Posted: Thu Nov 20, 2008 7:56 am Post subject: Re: Map :Q to :q? |
|
|
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
|
Posted: Fri Nov 21, 2008 10:37 pm Post subject: Re: Map :Q to :q? |
|
|
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 |
|