On 2006-04-12, Noah Spurrier <[EMAIL PROTECTED]> wrote:
> This is what I have in my .vimrc file
>
> autocmd FileType python map <F7> :!python %<CR>
> autocmd FileType sh map <F7> :!bash -c ./%<CR>
If you add <buffer> to those, then you can open files of various
types in different buffers without losing the mapping(s) for the
file(s) you want to execute.
autocmd FileType python map <buffer> <F7> :!python %<CR>
autocmd FileType sh map <buffer> <F7> :!bash -c ./%<CR>
HTH,
Gary
--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Wireless Division
| Spokane, Washington, USA