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 | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 166 |
2 | maomao90 | 163 |
2 | Um_nik | 163 |
4 | atcoder_official | 161 |
5 | adamant | 160 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | nor | 153 |
9 | Dominater069 | 153 |
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