dotfiles

dotfiles
git clone git://git.wimdupont.com/dotfiles.git
Log | Files | Refs | README | LICENSE

commit 33f7f093b8b43cc3a083c5e492d88231c003e5ef
parent f607d00fb0ce47e16cce7a9652ce06b0c214010e
Author: Wim Dupont <wim@wimdupont.com>
Date:   Sat,  4 May 2024 20:41:51 +0200

add filetype c

Diffstat:
Mvimrc | 20++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/vimrc b/vimrc @@ -62,8 +62,6 @@ endfunction runtime! ftplugin/man.vim -autocmd BufWritePost,FileWritePost config.def.h !sudo rm config.h && sudo make install - nnoremap <leader>t : call Toggle_transparent()<CR> nnoremap <leader>b : call Toggle_bookmode()<CR> nnoremap <leader>f : call Format()<CR> @@ -74,12 +72,14 @@ vnoremap <leader>P "_dP cmap W w !sudo tee > /dev/null % -map <F2> :w <CR> :!gcc % -o %< && ./%< <CR> -map <F3> :w <CR> :!gcc % -g -o %< && gdb ./%< <CR> -map <F4> :w <CR> :!make && ./%< <CR> -map <F5> :w <CR> :!make && gdb ./%< <CR> +autocmd BufWritePost,FileWritePost config.def.h !sudo rm config.h && sudo make install + +autocmd FileType c map <F2> :w <CR> :!gcc % -o %< && ./%< <CR> +autocmd FileType c map <F3> :w <CR> :!gcc % -g -o %< && gdb ./%< <CR> +autocmd FileType c map <F4> :w <CR> :!make && ./%< <CR> +autocmd FileType c map <F5> :w <CR> :!make && gdb ./%< <CR> -:command -bar -nargs=* Run :w | :!gcc % -o %< && ./%< <args> -:command -bar -nargs=* Rund :w | :!gcc % -o %< && gdb --args ./%< <args> -:command -bar -nargs=* Runm :w | :!make && ./%< <args> -:command -bar -nargs=* Runmd :w | :!make && gdb --args ./%< <args> +autocmd FileType c :command -bar -nargs=* Run :w | :!gcc % -o %< && ./%< <args> +autocmd FileType c :command -bar -nargs=* Rund :w | :!gcc % -o %< && gdb --args ./%< <args> +autocmd FileType c :command -bar -nargs=* Runm :w | :!make && ./%< <args> +autocmd FileType c :command -bar -nargs=* Runmd :w | :!make && gdb --args ./%< <args>