|
Hi vims.
I am begging to custoimize my vim keyboards settings and I have found a problem trying to map the Ctrl-Shift-s combination , I am using the next line in my .vimrc: noremap <C-S-s> :browse confirm saveas<CR> I also have the Ctrl-s map: noremap <C-S> :update<CR> The thing is that the first map seems to me mapped to the Ctr-s instead to be done to the Ctrl-Shift-s. Any ideas? thx -- Un saludo Best Regards Pablo Giménez --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~--- |
|
On 06/04/09 20:03, Pablo Giménez wrote: > Hi vims. > I am begging to custoimize my vim keyboards settings and I have found a > problem trying to map the Ctrl-Shift-s combination , I am using the next > line in my .vimrc: > noremap <C-S-s> :browse confirm saveas<CR> > > I also have the Ctrl-s map: > noremap <C-S> :update<CR> > > The thing is that the first map seems to me mapped to the Ctr-s instead > to be done to the Ctrl-Shift-s. > Any ideas? > thx > > > -- > Un saludo > Best Regards > Pablo Giménez Vim maps its Ctrl+printable_key combinations according to ASCII. This means that "Ctrl+lowercase letter" is the same as the corresponding "Ctrl+uppercase letter" and that Ctrl+<key> (where <key> is a printable key) is only defined when <key> is in the range 0x40-0x5F, a lowercase letter, or a question mark. It also means that Ctrl-[ is the same as Esc, Ctrl-M is the same as Enter, Ctrl-I is the same as Tab. So yes, Ctrl-s and Ctrl-S (i.e. Ctrl-s and Ctrl-Shift-s) are the same to Vim. This is by design and is not going to change. Any ideas? Yes: Use Fn or Shift-Fn as the {lhs} of your mappings. Of these, only F1 already has a default binding in Vim (and F10 may or may not be your system menu key). Best regards, Tony. -- There was a young lady from Hyde Who ate a green apple and died. While her lover lamented The apple fermented And made cider inside her inside. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~--- |
|
On Apr 6, 6:01 pm, Tony Mechelynck <[hidden email]> wrote: > Any ideas? Yes: Use Fn or Shift-Fn as the {lhs} of your mappings. Of > these, only F1 already has a default binding in Vim (and F10 may or may > not be your system menu key). > Or how about Alt mappings instead? Those are case-sensitive. Replace your <C-S-s> mapping with <A-S> for shift-S or <A-s> for lowercase s and it should work fine. You may also need to read up on :help 'winaltkeys' if you have trouble. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~--- |
|
Thanks Ben and Tony.
In my opinion this is a serius limitation, but anyway the best solution for me at the moment is to use Ctrl-Alt(Meta)-s, I am usin this map command: noremap <C-M-s> :browse confirm saveas<CR> My doubt with this is if this is going to work in Win and Mac, here at the office I have only linux. How the meta key is threated in Win and Mac? thx 2009/4/7 Ben Fritz <[hidden email]>
-- Un saludo Best Regards Pablo Giménez --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~--- |
|
In reply to this post by Ben Fritz
On 07/04/09 17:42, Ben Fritz wrote: > > > > On Apr 6, 6:01 pm, Tony Mechelynck<[hidden email]> > wrote: > >> Any ideas? Yes: Use Fn or Shift-Fn as the {lhs} of your mappings. Of >> these, only F1 already has a default binding in Vim (and F10 may or may >> not be your system menu key). >> > > Or how about Alt mappings instead? Those are case-sensitive. They are case-sensitive, yes, but they clash with accented letters and other upper-ascii, which makes them unusable in Insert mode for people like me, who often use languages other than English. Then again, in Console mode not every terminal passes the Alt modifier to the application program. > > Replace your<C-S-s> mapping with<A-S> for shift-S or<A-s> for > lowercase s and it should work fine. For instance, to Vim, Alt-s is a synonym of ó and Alt-S of Ó, so if you often write in Spanish or Hungarian you shouldn't use them as the {lhs} of Insert-mode mappings. > > You may also need to read up on :help 'winaltkeys' if you have trouble. Best regards, Tony. -- The truth is what is; what should be is a dirty lie. -- Lenny Bruce --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~--- |
|
In reply to this post by Pablo Giménez Pizarro
On 07/04/09 18:57, Pablo Giménez wrote: > Thanks Ben and Tony. > In my opinion this is a serius limitation, but anyway the best solution > for me at the moment is to use Ctrl-Alt(Meta)-s, I am usin this map command: > noremap <C-M-s> :browse confirm saveas<CR> > > My doubt with this is if this is going to work in Win and Mac, here at > the office I have only linux. > How the meta key is threated in Win and Mac? > thx I think Vim treats it the same as elsewhere (synonymous with "add-0x80") but on Windows, depending on which encoding your keyboard driver is set to use (in the "Western" world, often Windows-1252 in GUIs, cp437 or cp850 in the Dos Box) even Ctrl-Alt-letter combinations (0x80 to 0x9F) may clash with printable keys... I don't know about the Mac, and it may depend on whether you're on Mac OS X (a Unix-like OS) or on some earlier version. Best regards, Tony. -- If the code and the comments disagree, then both are probably wrong. -- Norm Schryer --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~--- |
| Powered by Nabble | Edit this page |
