User forums > Using Code::Blocks
How to auto open files with an external program?
MortenMacFly:
--- Quote from: TerryP on January 17, 2010, 12:36:50 am ---As a test, I've tried defining two file extensions:
*.c - set to open with associated application; it opens in the internal editor on double click.
*.png - set to open with associated application; it opens with the windows default on double click.
[...]
use the internal editor for Java code but an external editor for C++ files.
--- End quote ---
What's your use case? You are trying to edit natively supported files (all C/C++ files) with an external editor and others (like Java) with the internal one?! I don't get what you actually want. It's like trying to use Paint for documents and have it open images with word for me.
However, if I setup e.g. *.png to be used with an external program it works for me. Are you sure you did the setup correctly? You need to choose "use external program" and select the program in the settings field accordingly (see the attached image).
[attachment deleted by admin]
Jenna:
--- Quote from: MortenMacFly on January 17, 2010, 06:31:55 am ---However, if I setup e.g. *.png to be used with an external program it works for me. Are you sure you did the setup correctly? You need to choose "use external program" and select the program in the settings field accordingly (see the attached image).
--- End quote ---
Burt you have to make sure, that you have no other wildcard that matches the file you want to open, that comes earlier in the list, otherwise this one is used.
TerryP:
--- Quote from: jens on January 17, 2010, 09:57:41 am ---Burt you have to make sure, that you have no other wildcard that matches the file you want to open, that comes earlier in the list, otherwise this one is used.
--- End quote ---
File types known to Code::Blocks already (e.g. no file extension settings needed) wouldn't happen to come first on that list, would they? :-).
--- Quote from: MortenMacFly on January 17, 2010, 06:31:55 am ---What's your use case? You are trying to edit natively supported files (all C/C++ files) with an external editor and others (like Java) with the internal one?! I don't get what you actually want. It's like trying to use Paint for documents and have it open images with word for me.
--- End quote ---
My personal use case: would be to edit all code files by handing it off to a custom program that intelligently forwards to a vim server. That goes for all program source code short of APL.
The wider interest in adapting an IDE for project maintenance, is to make cross platform builds easier, while presenting a standardisable environment that is both friendly to vim / emacs / ed / TextMate / blah blah users and those preferring the internal editor, and doing it in a way that isn't a pain in the neck to support on work stations running different OSes.
As a matter of engineering, I would kind of expect telling Code::Blocks to open all *.cpp files in notepad, would make them open in notepad without regard for the internal editor \o/.
--- Quote from: MortenMacFly on January 17, 2010, 06:31:55 am ---However, if I setup e.g. *.png to be used with an external program it works for me. Are you sure you did the setup correctly? You need to choose "use external program" and select the program in the settings field accordingly (see the attached image).
--- End quote ---
Unless there is a secret manual that no one told me about, yes; and fully tested under 8.02 and the nightly mentioned in my OP. It seems only file types already known to C::B are having their user assigned file extension settings ignored.
TerryP:
A little bit of source editing and a recompile of rev6089, and Code::Blocks now obeys such orders more diligently, like would be expected in the first place....
MortenMacFly:
--- Quote from: TerryP on January 19, 2010, 05:14:12 am ---A little bit of source editing and a recompile of rev6089, and Code::Blocks now obeys such orders more diligently, like would be expected in the first place....
--- End quote ---
...patch?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version