Saturday, August 21, 2010

Exporting and Importing Code::Blocks Themes

I like coding a lot, keeps me glued to the PC for hours. For that reason it's a need to edit the Syntax Highlighter to suit my eyes for that long. I use Code::Blocks which lets me do just that. But redesigning the theme every time a crash or a OS reinstall takes place is a mess. That's when CB Share Config comes to play. Note you'll need to use the Nightlies version of Code::Blocks in this case. Here's a guide for doing that on Ubuntu [ http://tafhim.blogspot.com/2012/05/how-to-install-codeblocks-nightlies-in.html ]
And for Windows [ http://tafhim.blogspot.com/2012/05/setup-codeblocks-nightly-on-windows.html ]

To export your themes:
  1. Make sure Code::Blocks is not running
  2. Go to Code::Blocks Installation directory and run "cb_share_config.exe". If you are using Linux, open up terminal and type "sudo cb_share_cofig" to make the effect system wide or "cb_share_config" to make the effect work only for your account. (Thanks to this page's author for the remove 'sudo' tip)
  3. On the left side panel, click "...." and choose, "default.conf". (For XP users, it's in "C:\Documents & Settings\\Application Data\codeblocks\", For Linux(Ubuntu) users, it's in ~/.codeblocks/ or /home/user/.codeblocks/)
  4. Now tick the second option, ""
  5. Click "Export", choose "Yes" and show the location where you want to store it.


To import your themes:
  1. Make sure Code::Blocks is not running
  2. Go to Code::Blocks Installation directory and run "cb_share_config.exe" If you are using Linux, open up terminal and type "sudo cb_share_config"
  3. On the left side panel, click "...." and choose the file which holds the theme.
  4. In the right side panel choose your "default.conf" as stated above.
  5. Now click "Transfer >>" and give positive responses.
  6. Click "Save" and give positive response.

16 comments:

  1. THANK YOU SOOOO MUCH I used this to get my code::blocks theme from windows to linux

    ReplyDelete
  2. it doesn't work for me ^^"

    ReplyDelete
  3. finally it works XD thank you very much

    ReplyDelete
  4. Anonymous9:04 PM

    I tried copying the text from the sons of obsidian skin to a text file then changing the extension to config(.conf), however cb share config crashes when I load it for importing.I then looked inside the default.config file and saw that it's structure differs a lot .How must the config file look like for the transfer to work? Can anyone please provide a link with a good config file that might work?

    Here are a few links to the skin:
    Code for skin: https://bitbucket.org/0x1mason/son_of_obsidian_cb/src/4ed5a2829673/son_of_obsidian.conf?at=default

    CB forum: http://forums.codeblocks.org/index.php/topic,17354.msg119065.html#msg119065

    ReplyDelete
  5. First thing.
    The structure of my config [ http://tafhim.blogspot.com/2010/08/bruteforce-theme-for-codeblocks.html ] and Son-of-Obsidian look similar.....check the structure BEFORE using CB:Config on that...might be corrupting it. Just a guess..

    And by the way, don't compare that file with default.conf
    Your conf is just the theme part and default.conf is whole codeblocks cofiguaration..

    You could try with my configuration just for the sake of elimination??

    ReplyDelete
  6. Thank you very much. Very good theme. Now I can code with lesser eye stress! :)

    ReplyDelete
  7. Anonymous8:41 PM

    Hi. I cant find the location of the "default.conf" file in Linux. Would be a great help if you consider specific directions for each OS next time
    Thanks.

    ReplyDelete
  8. Ok, added the location of the 'default.conf' file (in Ubuntu)

    ReplyDelete
  9. Thank you for your kindly help!

    ReplyDelete
  10. sudo cb_share_cofig does not exist

    ReplyDelete
  11. sudo cb_share_cofig does not exist

    ReplyDelete
  12. sudo cb_share_co[n]fig
    I think you made a spelling mistake there @tomas

    ReplyDelete
  13. Anonymous12:32 PM

    Thank You so much! nice skins :D

    ReplyDelete
  14. sudo cb_share_co>N<fig

    ReplyDelete
    Replies
    1. Oops, thanks for pointing that out...

      Delete
  15. The Windows 7 location for the Code::Blocks default.conf file is %APPDATA%\CodeBlocks (this works if you type it in after clicking ... in the top address bar window).

    ReplyDelete

Post your comment here. If you want to say something about programming problems, scripts, software etc, please try to be as descriptive as possible.

Playing around with NL Toolkit

So I was planning to play around with Natural Language a little. I have started from this page here http://www.nltk.org/book/ch01.html sin...