|
quote:
Don't do these casts when writing C. void pointers are always implicitly castable to other pointers, all you'll achieve is to hide warnings you'd want to see (like if you forgot to include the prototype for malloc, or there's a more serious type mismatch).
|
# ¿ Mar 5, 2008 00:23 |
|
|
# ¿ May 6, 2024 08:33 |
|
ShinAli posted:Not a C question really but I wanna know how to set up vim to be a pretty good IDE for C programming. These are my C specific settings: autocmd BufRead,BufNewFile *.c,*.h,*.cc,*.cxx,*.hxx set cindent formatoptions=corq cinoptions=:0(0 textwidth=72 sm comments=sr:/*,rmb:*,exr:*/ That does auto-indentation with lining up the way I like it, paren/brace/bracket-matching, automatic comment formatting and wrapping (ie, you write /*<enter>, it fills in " * " for you, etc). Colors is just :syntax on. I don't use make integration and that stuff much, but see :help make.
|
# ¿ Sep 9, 2008 13:38 |