I'm not trying to change any mappings when I switch filetypes. Instead, I want to define a set of alternate mappings unique to the filetype which I can later switch to by calling SetAltMaps().
On Nov 11, 2:53 am, StarWing <[EMAIL PROTECTED]> wrote: > just define it in your vimrc, or in ftplugin file.an you can call the > function in autocmd. > > On 11月11日, 下午5时47分, David Liang <[EMAIL PROTECTED]> wrote: > > > Hi all, > > I'm trying to define a different set of alternate maps for different > > filetypes. What I'm doing right now is: > > > map <F12> :call SetAltMaps()<CR> > > map <C-F12> :call ResetMaps()<CR> > > > au BufEnter * call ResetMaps() > > au BufEnter * function! SetAltMaps() | map <F1> ... | ... | > > endfunction > > au BufEnter *.py function! SetAltMaps() | map <F1> ... | ... | > > endfunction > > au BufEnter *.java ... > > > But it doesn't look like I can define a function in an autocmd this > > way. Is there another way to do it? > > > Thanks, > > David Liang --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
