Saluton Matt :) On Wed 20 May 2009 06:36 +0200, Matt Wozniski <[email protected]> dixit: > 2009/5/19 Raúl Núñez de Arenas Coronado: >> >> I have a doubt about remapping the "Enter" key, in the following >> scenario: if Enter is pressed in certain context in normal or insert >> mode, it will change some of the text, insert a <CR> and leave us in >> insert mode. Outside that context, the "Enter" key should have the >> default behaviour
[...] > Don't know if you've thought about it, but an <expr> map might be > suitable... [...] > At least, this seems to work well for the constraints that you > outlined above. It may not work depending on what the "magic" is, > though, since <expr> maps are executed with a textlock. At some point I thought about using an <expr> map, and using the resulting text produced by the expression. The problem is that the "magic" consists on inserting some texts, carriage returns and text reflows (using gqip). So for me it's easier to perform that tasks in the function and not as a result of the function return text. I can't do that with a textlock, because then the function should return a very complex text. It can be done, of course, but it is more difficult than the way I currently use. Thanks for pointing, thought! :))) -- Raúl "DervishD" Núñez de Arenas Coronado Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen! --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
