On 2021-08-29, HungPham3112 wrote:
> I used gcc for a while and now I move to clang
>
> I mapped <F9> for run command for c file
>
> Before :
>
> "Compile C code
> augroup c_settings
> au!
> au FileType c nnoremap <buffer> <silent> <F9> :!gcc % -o %< && %< <CR><CR>
> au FileType c inoremap <buffer> <silent> <F9> <esc> :!gcc % -o %< && %<
> <CR><CR>
> augroup END
>
>
> After:
>
> "Compile C code
> augroup c_settings
> au!
> au FileType c nnoremap <buffer> <silent> <F9> :!clang % -o %.exe && %.exe
> <CR><CR>
> au FileType c inoremap <buffer> <silent> <F9> <Esc> :!clang % -o %.exe &&
> %.exe <CR><CR>
> augroup END
>
>
> But when i run command it still is gcc.
>
> Vim-info:
>
> VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 26 2021 22:02:38)
> MS-Windows 64-bit GUI version with OLE support
> Included patches: 1-3377
> Compiled by appveyor@APPVYR-WIN
> Huge version with GUI. Features included (+) or not (-):
To find the current definitions of those mappings and where they
were defined, execute the following commands while editing a C file:
:verbose map <F9>
:verbose imap <F9>
That will tell you if your mappings are being overridden by some
plugin or elsewhere in your vimrc.
Regards,
Gary
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20210830022111.GB17568%40phoenix.