[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: How to auto indent the afl code into NotePad++ (as prettify)



PureBytes Links

Trading Reference Links

Thank you GP for your feedback.

I thought to a special AFL addon dedicated to NP++ or an unseen
parameter or weird name functionality.

I will use your way, place a pair of braces then I'll include the
code, NP++ shows the indent with a vertical line to help. NP++ is
easier to read with the collapse level than with AB editor.


Best Regards

R

--- In amibroker@xxxxxxxxxxxxxxx, "gp_sydney" <gp.investment@xxx> wrote:
>
> Sorry, I haven't seen any general editors that have that sort of
> functionality. Personally I format code how I want it to look as I
> write it, and wouldn't want any automated program "prettifying" it.
> 
> To ensure matching braces, I generally enter the closing one at the
> same time as the opening one (my editor often does this automatically
> using templates) and then fill in the code in between.
> 
> Mismatching parentheses is not such an issue, as the compiler or
> interpreter will flag it as a syntax error and it's usually very easy
> to spot where to add or remove one.
> 
> Auto-correcting either mismatching braces or parentheses is not really
> possible, as the editor can't know your logic and thus exactly where
> to put (or remove) one. From my quick test with the AmiBroker
> function, it doesn't try to correct them either.
> 
> I'm not sure with User Defined, but as C++ Notepad++ can indicate
> matching parentheses and braces on a one-by-one basis. If you put the
> cursor on an open parenthesis or brace, it will highlight where it
> thinks the matching closing one is.
> 
> Hope this helps.
> 
> GP
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "reinsley" <reinsley@> wrote:
> >
> > Hello GP_sydney,
> > 
> > Sorry for my bad explanations.
> > 
> > I have AFL defined as User Defined Langage into Notepad++, so your tip
> > does the same to highlight etc.
> > 
> > I'am looking for the same "Prettify Selection" AB functionnality but
> > into NP++. 
> > I'd like to find a knack, an easy way to match automaticaly
> > parenthesis, loop, ...to find errors and get indent in NP++.
> > 
> > Until now, I begin to create the formula into NP++, copy-paste from
> > NP++ into AB editor, prettify, copy-paste from AB editor to NP++ and
> > so on...
> > For every change, I do it again and again...
> > 
> > I searched into NP++ doc but I found nothing. 
> > Each langage as it's own way of prettifying.
> > 
> > If possible, how can I easily and automaticaly correct a missing
> > parenthesis into NP++ ? 
> > 
> > Best Regards
> > 
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "gp_sydney" <gp.investment@> wrote:
> > >
> > > Not sure what you mean by auto-indent, but if you go into
> > > "Settings->Style Configurator", select C++ in the language list, and
> > > then add AFL to the "User ext" box at the bottom, Notepad++ will
treat
> > > AFL the same as C++ with the same syntax highlighting, etc.
> > > 
> > > You can then verify this by loading an AFL file and selecting the
> > > Language menu. It should show C++ selected.
> > > 
> > > Regards,
> > > GP
> > > 
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, "reinsley" <reinsley@> wrote:
> > > >
> > > > Hello,
> > > > 
> > > > I juggle with NotePad++ and AB editor.
> > > > 
> > > > It's a bit heavy and sometimes I lose the last version between the
> > > > copy-past backward and forward movements.
> > > > 
> > > > NotePad++ is perfect except for auto-indent.
> > > > 
> > > > How can I auto-indent the afl code into NotePad++, as the prettyfy
> > > > function
> > > > does in AB ?
> > > > 
> > > > Thank in advance
> > > > 
> > > > Best Regards
> > > >
> > >
> >
>



------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/