Hi everyone! Could you help me to find where can I make a default source and open it in Codeblocks? Thanks.
# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | djm03178 | 152 |
Hi everyone! Could you help me to find where can I make a default source and open it in Codeblocks? Thanks.
Name |
---|
Go to Settings -> Editor -> Default Code and enter the source you want.
I did that in the same way you said, but it doesn't work! :( What should I do now?
It doesn't work for main.cpp file, when you're creating new project. Only for new file in the existing project.
If you want to change default code of main.cpp when you create new project in CodeBlocks then here is my way (I tested on Windows):
- Go to Program Files/CodeBlocks/share/CodeBlocks/templates/wizard/console/cpp.
- You'll see file main.cpp, what you need is just edit content of this file to your default code.
Hope this will help you!
i did it but when i am creating a new file with CTRL+SHIFT+N , it happens to be blank file
You can use code abbreviation. Go to codeblocks->setting -> Abbreviation. Then create a new keyword and paste your default code and save it. Then every time you open a new file .....save it. Then write the keyword you created.then press ctrl+j. Your default code will appear... ;D
Thanks that was really helpful. I am now using it. I guess most people don't know about it.
do you know how to do this in sublime text editor???
Sorry, I don't use sublime.
u can use a default template in sublime.
A simple google search leads to this and it works.
Thnks!! its working :)
I could not find Abbreviation in setting. Where is it?
It says that I don't have permission from owner to change it.
(on windows 10) right click on the file then select properties -> security -> Edit -> Add -> type the username in the box and click on check names. then click OK -> Apply and then you can close the windows
Which username do I enter?
the username of your current user