1. More WEE requests

Trying to ween myself off of Crimson Editor. These are some of the features that I use the most, in no particular order:

  • Selecting multiple files to open at the same time
  • Right click on tab to open drop-down menu with Close, Save, Save As, etc.
  • Macros to record frequently used keystroke sequences
  • Block indenting (increase and decrease a tab width)
  • Block commenting/uncommenting

Since you're being so accommodating, I figured it'd be better than not to ask.

I'm growing very fond of the completions and how I'm reminded to include necessary files.

new topic     » topic index » view message » categorize

2. Re: More WEE requests

I've released a new version of Wee 0.21 with some of these features:

  • Open file dialog allows multi select (windows only)
  • Pop-up menu for tabs (windows only)
  • Colors dialog (finally!)
  • DLL open works better when bound/compiled

Block indent/unindent was already there (select some lines and press tab or shift+tab)

Block commenting is on the todo list

Macro recording is not something I'm keen on doing. If you can provide a patch, I'll put it in.

new topic     » goto parent     » topic index » view message » categorize

3. Re: More WEE requests

PeteE said...

I've released a new version of Wee 0.21 with some of these features:

  • Open file dialog allows multi select (windows only)
  • Pop-up menu for tabs (windows only)

I'll send you patches to implement those in EuGTK.

new topic     » goto parent     » topic index » view message » categorize

4. Re: More WEE requests

Replying on the forum, rather than e-mail, as perhaps someone else can benefit from these code snippets:

 
-- Implements pop-up notebook tab menus  
-- not to be confused with the menus that pop up over notebook 
-- pages automatically (copy/paste, etc.) 
 
-- modified (this is needed by WEE, when 'New File' is replaced with a filename) 
global procedure ui_update_tab_name(integer tab, sequence name) 
 atom pg = gtk:get(notebook,"nth page",tab-1) 
 atom btn = gtk:get(notebook,"tab label",pg) 
 set(btn,"label",name) 
end procedure 
 
-- new popup menu; 
constant tab_popup_menu = create(GtkMenu,{ 
	{"title","Popup Menu"}, 
	{"append",create(GtkMenuItem,"gtk-new", 
		call_back(routine_id("FileNew")))}, 
	{"append",create(GtkMenuItem,"gtk-save-as", 
		call_back(routine_id("FileSaveAs")))}, 
	{"append",create(GtkMenuItem,"gtk-close", 
		call_back(routine_id("FileClose")))}}) 
	show_all(tab_popup_menu) 
  
-- new popup handler;        
function PopupTabMenu(atom btn,atom event, object pg) 
	btn = events:button(event) -- must include events.e  
	set(notebook,"current page",pg) -- popup traps the normal pg change signal, so D.I.Y. 
	if btn = 3 then -- ignore other buttons 
		set(tab_popup_menu,"popup") 
	end if 
return 1 
end function 
constant popup_tab_menu = call_back(routine_id("PopupTabMenu")) 
 
-- modified; 
global function ui_new_tab(sequence name) 
  atom editor, btn, pg -- 
 
  btn = create(GtkButton,name)      -- something that can catch clicks 
  set(btn,"relief",GTK_RELIEF_NONE) -- if you'd rather not see outline  
   
  editor = scintilla_new() 
  ui_hedits &= editor 
  init_edit(editor) 
  gtk_proc("gtk_widget_show", {P}, editor) 
   
  pg = set(notebook, "append page", editor, btn) -- save new pg id 
  connect(btn,"button-press-event",popup_tab_menu,pg) -- call handler 
   
  connect(editor, "sci-notify", sci_notify_cb, 0) 
 
  return editor 
end function 
 
new topic     » goto parent     » topic index » view message » categorize

5. Re: More WEE requests

Replying on the forum, rather than e-mail, as perhaps someone else can benefit from these code snippets

  
 -- set up dialog to open one or more files; 
  
global function ui_get_open_file_name()  
  atom dialog 
  object filenames 
   
  dialog = create(GtkFileChooserDialog,{ 
    {"title","Open..."}, 
    {"action",GTK_FILE_CHOOSER_ACTION_OPEN}, 
    {"select multiple", TRUE}, 
    {"add button", "gtk-cancel", GTK_RESPONSE_CLOSE}, 
    {"add button", "gtk-ok", GTK_RESPONSE_OK}, 
    {"position", GTK_WIN_POS_MOUSE}, 
    {"current folder", pathname(canonical_path(file_name))}}) 
   
  add(dialog, {filter1, filter2, filter3}) 
   
  if gtk:get(dialog, "run") = GTK_RESPONSE_OK then 
    filenames = gtk:get(dialog, "filenames") 
     
		-- if one file chosen, looks like this: 
		--{ 
		--	"/home/irv/WEE-master/parser.e" 
		--} 
    if length(filenames) = 1 then 
		filenames = filenames[1] -- just return the one name; 
		 
	else 
		-- multiple files selected: 
		--{  
		--  "/home/irv/WEE-master/parser.e", 
		--  "/home/irv/WEE-master/scintilla.e", 
		--  "/home/irv/WEE-master/ui_win.e" 
		--} 
		-- you'll have to modify your open_file function to  
		-- loop thru this sequence of filenames;	 
	end if 
   
  else 
     
    filenames = "" -- nothing selected; 
     
  end if 
   
  set(dialog, "hide") 
 
  return filenames 
   
end function 
 
new topic     » goto parent     » topic index » view message » categorize

6. Re: More WEE requests

PeteE said...

I've released a new version of Wee 0.21 with some of these features:

  • Open file dialog allows multi select (windows only)
  • Pop-up menu for tabs (windows only)
  • Colors dialog (finally!)
  • DLL open works better when bound/compiled

Block indent/unindent was already there (select some lines and press tab or shift+tab)

Block commenting is on the todo list

Macro recording is not something I'm keen on doing. If you can provide a patch, I'll put it in.

Thanks Pete! I knew block indenting worked, but for some reason (operator error), unindent didn't (ctrl instead of shift). Macros aren't that big of a deal to me (and I doubt I could figure out how to make them work).

new topic     » goto parent     » topic index » view message » categorize

7. Re: More WEE requests

Hate to be a pain, but the updater doesn't seem to be working. Tried to run a few times, still at V0.20

new topic     » goto parent     » topic index » view message » categorize

8. Re: More WEE requests

evanmars said...

Hate to be a pain, but the updater doesn't seem to be working. Tried to run a few times, still at V0.20

D'oh! I forgot to push the changes to github, which I have now done. I realized today that I forgot to do the find dialog change this time around. I'll get it in the next one.

Irv, I was going to add those features to the GTK version, but you beat me to it. Thanks!

new topic     » goto parent     » topic index » view message » categorize

9. Re: More WEE requests

I'm finding that the tab_popup_menu is really handy, quicker to use than the traditional File menu. And it's a snap to add new features to it.

Could you add an option to turn off the auto-completion of brackets? After years of using editors without that feature, now find it gets in my way. I'm always having to go back and delete the extra ones my fingers have 'automatically' completed.

new topic     » goto parent     » topic index » view message » categorize

10. Re: More WEE requests

irv said...

I'm finding that the tab_popup_menu is really handy, quicker to use than the traditional File menu. And it's a snap to add new features to it.

I have a few minor issues with the tab popup menu. The GtkButtons on the tab still have a relief appear when you hover over them. The tab popup menu doesn't stay open when you click and release, like menu bars do. The area for right clicking is smaller than the tab itself, you need to hit the button text otherwise it won't activate.

irv said...

Could you add an option to turn off the auto-completion of brackets? After years of using editors without that feature, now find it gets in my way. I'm always having to go back and delete the extra ones my fingers have 'automatically' completed.

Please tell me how it gets in your way with a specific example of what you typed. I tried to make the bracket completion unobtrusive, so that if you type normally, it overwrites the completed brackets as you type them. However, the overwrite mode stops when you move the cursor with the mouse or arrow keys. Here's an example:

type    result 
------- --------------------- 
foo[    foo[] 
123     foo[123] 
]       foo[123] 
[       foo[123][] 
(       foo[123][()] 
i+1     foo[123][(i+1)] 
)*2     foo[123][(i+1)*2] 
]       foo[123][(i+1)*2] 
 = {    foo[123][(i+1)*2] = {} 
1, {    foo[123][(i+1)*2] = {1, {}} 
"       foo[123][(i+1)*2] = {1, {""}} 
bar     foo[123][(i+1)*2] = {1, {"bar"}} 
"       foo[123][(i+1)*2] = {1, {"bar"}} 
}       foo[123][(i+1)*2] = {1, {"bar"}} 
}       foo[123][(i+1)*2] = {1, {"bar"}} 

Also, if you backspace to remove an open-bracket, it should remove the completed close-bracket too.

new topic     » goto parent     » topic index » view message » categorize

11. Re: More WEE requests

PeteE said...

I have a few minor issues with the tab popup menu. The GtkButtons on the tab still have a relief appear when you hover over them. The tab popup menu doesn't stay open when you click and release, like menu bars do. The area for right clicking is smaller than the tab itself, you need to hit the button text otherwise it won't activate.

I was able to solve these myself, and have pushed WEE version 0.22, with these changes exclusive to the GTK version:

  • multiple file open
  • right-click tab menu
  • cursor position status label

Irv, I have made my own changes to events.e in case you want to pull those into your version.

new topic     » goto parent     » topic index » view message » categorize

12. Re: More WEE requests

Thanks, as you can see from the comment in the file, this was a 'quick and dirty' hack, done primarily so that I could write the calculator demo which reads keypad keys and converts them into 'normal' keystrokes. (Or maybe the other way around, I forget now)

new topic     » goto parent     » topic index » view message » categorize

13. Re: More WEE requests

As for auto-completion, there's nothing wrong with the way you've implemented it. Geany has that too, and it's the first thing I turn off. Rather than go into a long explanation of why I don't like it, let me just say, remember "Clippy"?

Since most people probably like auto-completion, I'll withdraw my option request, and just turn it off myself.

That's the advantage of having the WEE editor written in Euphoria. We can easily edit the code to change things we don't like.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu