Re: syntax switching
Hi Pavel, On Thu, 2006-02-02 at 17:55 +0200, Pavel Tsekov wrote: The patch isn't working quite as I'd expect it. If syntax highlighting is off when opening a file - it is not possible to switch it on (i.e. see the file coloured after Ctrl + S) because the syntax rules are not loaded yet. If this is the expected behaviour i.e. the patch honours the syntax highlighting switch then I'd expect it not to change that switch on editor exit i.e. if I close the editor with syntax off it should not remember that. Ok. I'll see if I can fix it. Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: syntax switching
Hi Pavel, On Thu, 2006-02-02 at 17:55 +0200, Pavel Tsekov wrote: The patch isn't working quite as I'd expect it. If syntax highlighting is off when opening a file - it is not possible to switch it on (i.e. see the file coloured after Ctrl + S) because the syntax rules are not loaded yet. If this is the expected behaviour i.e. the patch honours the syntax highlighting switch then I'd expect it not to change that switch on editor exit i.e. if I close the editor with syntax off it should not remember that. Fixed. I reload the syntax on toggle to on. Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: syntax switching
On Wed, 1 Feb 2006, Leonard den Ottolander wrote: On Mon, 2006-01-30 at 13:55 +0200, Andy Shevchenko wrote: Arny (one of developers of MPlayer) made patch for mc old version. I catch the syntax highlighting toggle feature from it and adopt to a last FC package. I hope, the switcher of syntax highlightind is a usefull feature and should like to be added to mainstream. Patch has been committed. We might use a different hotkey than Ctrl-S in the future. The patch isn't working quite as I'd expect it. If syntax highlighting is off when opening a file - it is not possible to switch it on (i.e. see the file coloured after Ctrl + S) because the syntax rules are not loaded yet. If this is the expected behaviour i.e. the patch honours the syntax highlighting switch then I'd expect it not to change that switch on editor exit i.e. if I close the editor with syntax off it should not remember that. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: syntax switching
Hi Andy, On Mon, 2006-01-30 at 13:55 +0200, Andy Shevchenko wrote: Arny (one of developers of MPlayer) made patch for mc old version. I catch the syntax highlighting toggle feature from it and adopt to a last FC package. I hope, the switcher of syntax highlightind is a usefull feature and should like to be added to mainstream. Patch has been committed. We might use a different hotkey than Ctrl-S in the future. Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: syntax switching
Hello Andy, On Mon, 2006-01-30 at 13:55 +0200, Andy Shevchenko wrote: Arny (one of developers of MPlayer) made patch for mc old version. I catch the syntax highlighting toggle feature from it and adopt to a last FC package. I hope, the switcher of syntax highlightind is a usefull feature and should like to be added to mainstream. I would prefer it if this patch could be integrated with the new Syntax Highlighting dialog in the Options menu. A checkbox that respects this toggle and an Ok button need to be added to that dialog. Maybe the aforementioned developer could complete his patch in this respect? Note that you can already toggle the syntax highlighting by choosing unknown in that dialog. (This is not meant as an argument against a global toggle.) Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: syntax switching
On Tue, 31 Jan 2006, Leonard den Ottolander wrote: Hello Andy, On Mon, 2006-01-30 at 13:55 +0200, Andy Shevchenko wrote: Arny (one of developers of MPlayer) made patch for mc old version. I catch the syntax highlighting toggle feature from it and adopt to a last FC package. I hope, the switcher of syntax highlightind is a usefull feature and should like to be added to mainstream. I would prefer it if this patch could be integrated with the new Syntax Highlighting dialog in the Options menu. A checkbox that respects this toggle and an Ok button need to be added to that dialog. Maybe the aforementioned developer could complete his patch in this respect? There is such toggle already in the editor configuration dialog box. The point of this patch is to let the user quickly switch syntax highlighting on and of (IMO). Note that you can already toggle the syntax highlighting by choosing unknown in that dialog. (This is not meant as an argument against a global toggle.) But that is not as fast as a single key press. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
syntax switching
Hi! I am using mc shipped by fedora and I do not know exactly about proposed feature in the mc development stage. Arny (one of developers of MPlayer) made patch for mc old version. I catch the syntax highlighting toggle feature from it and adopt to a last FC package. I hope, the switcher of syntax highlightind is a usefull feature and should like to be added to mainstream. Thank you and please consider attached patch. -- With best regards, Andy Shevchenko. mailto: [EMAIL PROTECTED] --- mc-4.6.1a/edit/edit.c.amc 2005-11-11 14:41:30.0 +0200 +++ mc-4.6.1a/edit/edit.c 2005-11-11 14:41:31.0 +0200 @@ -2597,6 +2597,11 @@ edit_execute_cmd (WEdit *edit, int comma edit_insert_file_cmd (edit); break; +case CK_Toggle_Syntax: + option_syntax_highlighting ^= 1; + edit-force |= REDRAW_PAGE; + break; + case CK_Find: edit_search_cmd (edit, 0); break; --- mc-4.6.1a/edit/editcmddef.h.amc 2005-07-20 14:56:30.0 +0300 +++ mc-4.6.1a/edit/editcmddef.h 2005-11-11 14:41:31.0 +0200 @@ -108,6 +108,8 @@ #define CK_Check_Save_And_Quit 457 #define CK_Maximize458 +#define CK_Toggle_Syntax 480 + /* macro */ #define CK_Begin_Record_Macro 501 #define CK_End_Record_Macro502 --- mc-4.6.1a/edit/editkeys.c.amc 2005-11-11 14:41:30.0 +0200 +++ mc-4.6.1a/edit/editkeys.c 2005-11-11 18:56:16.0 +0200 @@ -112,6 +112,7 @@ static const edit_key_map_type common_ke { XCTRL ('k'), CK_Delete_To_Line_End }, { XCTRL ('l'), CK_Refresh }, { XCTRL ('o'), CK_Shell }, +{ XCTRL ('s'), CK_Toggle_Syntax }, { XCTRL ('u'), CK_Undo }, { XCTRL ('t'), CK_Select_Codepage }, { XCTRL ('q'), CK_Insert_Literal }, ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: syntax switching
On Mon, 30 Jan 2006, Andy Shevchenko wrote: Arny (one of developers of MPlayer) made patch for mc old version. I catch the syntax highlighting toggle feature from it and adopt to a last FC package. I hope, the switcher of syntax highlightind is a usefull feature and should like to be added to mainstream. Thank you and please consider attached patch. I think this patch is worth adding. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: syntax switching
On Mon, Jan 30, 2006 at 03:07:24PM +0200, Pavel Tsekov wrote: On Mon, 30 Jan 2006, Andy Shevchenko wrote: Arny (one of developers of MPlayer) made patch for mc old version. I catch the syntax highlighting toggle feature from it and adopt to a last FC package. I hope, the switcher of syntax highlightind is a usefull feature and should like to be added to mainstream. Thank you and please consider attached patch. I think this patch is worth adding. why not ... somehow ctrl-s feels too worthwhile to waste it on such a minor function. anyway ... also consider a toggle key for my visible whitespace patch which i will push shortly. ctrl-w would complement ctrl-s nicely, i think. apropos syntax highlighting ... i just used the asm syntax and noticed that section names are colored light blue ... well ... this color really should not be used for anything but whitespace - i had a tough time reading it. it certainly depends on the monitor settings, but mine are not that extraordinary. -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: syntax switching
On Mon, 30 Jan 2006, Oswald Buddenhagen wrote: On Mon, Jan 30, 2006 at 03:07:24PM +0200, Pavel Tsekov wrote: On Mon, 30 Jan 2006, Andy Shevchenko wrote: Arny (one of developers of MPlayer) made patch for mc old version. I catch the syntax highlighting toggle feature from it and adopt to a last FC package. I hope, the switcher of syntax highlightind is a usefull feature and should like to be added to mainstream. Thank you and please consider attached patch. I think this patch is worth adding. why not ... somehow ctrl-s feels too worthwhile to waste it on such a minor function. anyway ... Well, it can be changed to anything appropriate... Which shortcut is used in other file managers ? I have no personal preference. also consider a toggle key for my visible whitespace patch which i will push shortly. ctrl-w would complement ctrl-s nicely, i think. I am looking at that patch right as we speak. It was in my list of to be reviewed patchs for several days now. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: syntax switching
On Mon, Jan 30, 2006 at 04:16:51PM +0200, Mike V. Gorchak wrote: But as for me C/C++ comments are have really ugly color :) i agree it's ugly, but at least i can read it. :) provided of course, a fat (vga-like) font is used - but using thin fonts on dark backgrounds is insane anyway. -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: syntax switching
Hello, Oswald! OB apropos syntax highlighting ... i just used the asm syntax and noticed OB that section names are colored light blue ... well ... this color OB really should not be used for anything but whitespace - i had a tough OB time reading it. it certainly depends on the monitor settings, but mine OB are not that extraordinary. heh, that was my syntax file for asm. I did it because mc does not had that syntax before at all. So I think colours can be changed, but they are suitable for me (and my monitor color temperature setup). I'm really using this asm syntax very often :) But as for me C/C++ comments are have really ugly color :) With best regards, Mike V. Gorchak. E-mail: [EMAIL PROTECTED] ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: syntax switching
On Mon, Jan 30, 2006 at 04:05:23PM +0200, Pavel Tsekov wrote: On Mon, 30 Jan 2006, Oswald Buddenhagen wrote: On Mon, Jan 30, 2006 at 03:07:24PM +0200, Pavel Tsekov wrote: On Mon, 30 Jan 2006, Andy Shevchenko wrote: Arny (one of developers of MPlayer) made patch for mc old version. I catch the syntax highlighting toggle feature from it and adopt to a last FC package. I hope, the switcher of syntax highlightind is a usefull feature and should like to be added to mainstream. Thank you and please consider attached patch. I think this patch is worth adding. why not ... somehow ctrl-s feels too worthwhile to waste it on such a minor function. anyway ... Well, it can be changed to anything appropriate... Which shortcut is used in other file managers ? I have no personal preference. i have no idea ... i considered ctrl-w for visible trailing whitespace and ctrl-t for visible tabs. but ctrl-t collides with turbo-c's delete word (which i hope somebody will implement :). but then, delete word should be mapped to ctrl-delete (when no block is selected). this leads me to a completely new topic ... configurable keyboard schemes. i really liked turbo-c editor's (wordstar like) scheme. ok, this goes a bit overboard ... :) -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel