User forums > Using Code::Blocks

force file reloading

(1/2) > >>

vix:
Is there a command to force C::B reloading from disk an opened file?
I mean: if open a file, do some changes (without saving), then I realize I did something wrong, I'd like to reload the file from disk (discarding the pending changes). I usually close the opened file without saving, then reopen the same file from disk.
But is there a "reload" command?

Thank you very much.

Jenna:
As far as I know, there is nothing like that.

But why do you not use the undo-function (shortcut ctrl+z).

vix:
I think that undo function is an effective way only if you have done few modifications; If you have to press CTRL+Z 10 times or more (for example), It's not so good.

Moreover there is another situation I often experience, even if I think it's not so common.
Imagine you are debugging a project that writes its output over a txt file, and you like watching this file inside C::B (because you are debugging using C::B). You open this file, but while program executes, additional informations are added to this file. If you can update the view of the file content simply with a shortcut (F5 key as in some browsers, for example) you will be very happy... I think

oBFusCATed:
1. C::B is not a browser, but IDE/editor, and no editor I know does this
2. The files is monitored for modifications and a message pops up, when such thing happens
3. What if you have autosave enabled?

daniloz:
I'd like to have this functionality as well... my comments:


--- Quote ---1. C::B is not a browser, but IDE/editor, and no editor I know does this

--- End quote ---

Notepad++ does... it has a reload functionality (which I map to F5, btw)


--- Quote ---2. The files is monitored for modifications and a message pops up, when such thing happens

--- End quote ---

Very seldom, C::B miss some modifications though... I've experienced it once or twice, since I use another IDE in parallel for compilation (VisualDSP++ from Analog Devices to compile for a SHARC DSP)


--- Quote ---3. What if you have autosave enabled?

--- End quote ---

Then , it should reload the last saved version and it's up to the user handle this issue...

Navigation

[0] Message Index

[#] Next page

Go to full version