So how about marcos get fixed

已回答

If I write a sequence of characters it should print the same via macros.

But no, that type of quality seems to be missing.

My macro, for example, should print this string:

{% %}

and then positions my cursor in the middle. 

Make sense (template tags).

In a python page it usually prints

{% }

on a html page (template) I get:

{%

and the variations continue ad nauseam.

Another example of untested, unserviced, and unprofessional feature creep. JB team slowing me down with garbage features.

 

 

0

Could you please share how you defined this macro?

BTW, in Django/Jinja2 template closing "%}" is inserted automatically. Also, it's easier to use live template to create snippets like that in the editor.

0

"inserted automatically" -- try again. The macros are highly unstable in conjunction with autocomplete. I hate typing {% and use a macro. My use is faster than typing but a long shot.

Auto complete is pretty flakey (like the J on this page) .

I use macros (like other IDEs) because my macro implementation is much more efficient than auto complete. Additionally, I have been doing this for so long, I don't use autocomplete too much because I learned to write macros and type the closer for tags. That habit is not going away.

So you can wave that teat in my face, I am not latching

How to I write macro? Trigger record > capture keystrokes > stop record > add name > assign to shortcut in prefs.

"Also, it's easier to use live template to create snippets like that in the editor." What? I don't think you understand.

Macros are used. They are unstable. The autocomplete in JB is not stable. There are bugs. 

0

> How to I write macro? Trigger record > capture keystrokes > stop record > add name > assign to shortcut in prefs.

I meant the exact combination of keystrokes that were used to define that macro, so we could reproduce your problem on our side, because I don't observe the same behavior so far. Preferably a screenshot of "Edit Macro" dialog.

I know there are some problems with macros in PyCharm, but normally there are other means to achieve the same things in the editor, which can interfere with macros at times. For instance, if your macro gets affected by the aforementioned automatic "%}" insertion, you can disable it in Settings | Editor | General | Smart Keys | Auto-insert closing }} and %} in Django templates.

Live templates might be useful to wrap the selection in the editor with an arbitrary text like "{% %}" which might be useful in context of templates. But I see now that your intent is different.

0

请先登录再写评论。