Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding compilation flags #41

Closed
raivivek opened this issue Jul 17, 2013 · 7 comments
Closed

Adding compilation flags #41

raivivek opened this issue Jul 17, 2013 · 7 comments

Comments

@raivivek
Copy link

When compiling a cpp or c file, it executes with a basic default flags for compilation. Is there any way, I can add manual compilation flags to the input?

@xuhdev
Copy link
Owner

xuhdev commented Jul 17, 2013

Try :h SCCompileAF

@raivivek
Copy link
Author

Thanks. However, If I want some compilation flags to be always enabled for certain type of file types only, how can I change the default behavior then? Is there any way, I can tweak or change the default compilation list for each filetype or define one for some of them which will always be executed with them.

@xuhdev
Copy link
Owner

xuhdev commented Jul 18, 2013

@vivekiitkgp You could try something like this:

autocmd Filetype c nmap <buffer> <F9> :SCCompileAF --your-flags

@raivivek
Copy link
Author

Thanks. It helps in a much better way.

@xuhdev xuhdev closed this as completed Jul 19, 2013
@xuhdev
Copy link
Owner

xuhdev commented Aug 9, 2013

@vivekiitkgp I've added the solution to a wiki page. Feel free to modify it.

And thanks for your report of this issue.

@raivivek
Copy link
Author

raivivek commented Aug 9, 2013

Thanks for the fact that you added it the wiki page. I think I would love if you could change. After this option is set and I press the appropriate keys, the commands aren't run at once. Rather, it is placed in command area and one has to hit Enter to run it. So, I'm adding a <CR> at the end.

@xuhdev
Copy link
Owner

xuhdev commented Aug 9, 2013

Yeah I forgot that. Thanks @vivekiitkgp !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants