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 | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | Dominater069 | 154 |
8 | awoo | 154 |
10 | luogu_official | 150 |
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