Page 1 of 1
I am lacking the ability to 'close all files but this'
Posted: Sun Jan 15, 2012 4:19 am
by Arthur
I am lacking the option of being able to close all files, except the current one in one click.
I just find it very convenient to be able to leave the currently active file open instead of closing each irrelevant one up individually.
Posted: Sun Jan 15, 2012 6:54 am
by jussij
I am lacking the option of being able to close all files, except the current one in one click.
The following macro will implement this behaviour:
Code: Select all
--
-- Name: Close Windows
--
-- Author: Omer Kircher
--
-- Language: Lua Macro
--
-- Description: This macro function will close all but the current window.
--
function key_macro()
local count = get_window_count()
local current_id = get_window_id()
for index = 0, count, 1 do
if current_id == get_window_id() then
WindowPrevious()
else
-- close the window
if FileClose() ~= 1 then
-- user hit cancle on the close
break
end
end
end
end
key_macro() -- run the macro
Posted: Sun Jan 15, 2012 9:15 pm
by Arthur
Awesome, a very programmatic way!
However, I can see there is a Document List implemented (Alt-B, hmm perhaps should be Alt-D, nevertheless), that one is probably the one that should get my missing functionality, just one more button (there is space!) added as say "Close All But Highlighted" would be a terrific + in its usability.
Posted: Mon Jan 16, 2012 1:20 am
by jussij
However, I can see there is a Document List implemented (Alt-B, hmm perhaps should be Alt-D, nevertheless)
Luckily this is very easy to fix
Use the
Options, Editor Options menu, select the
Keyboard Mapping panel and hit the
Edit button.
In the resulting dialog type in
Alt+B and delete the binding. Then hit the
Alt+D , remove any binding it may currently have and then assign the key to the
FileListDisplayEx function.
NOTE: This is the same dialog that allows you to bind a keyboard key to a macro. Just change the
Category option.
that one is probably the one that should get my missing functionality
I will look to add this functionality to this dialog.
Cheers Jussi
Posted: Fri Jan 27, 2012 1:39 am
by jussij
This functionality is now in the latest version of Zeus.
For more details see here:
http://www.zeusedit.com/zforum/viewforum.php?f=6
Cheers Jussi