It is a long, long, time since I've thrown one of these into the
maelstrom of our musings.
(have the nightmares receded?)
Do you make use of your IDE's expansionist tendencies, and if-so, which ones?
NB this is where vi/emacs enthusiasts start chuckling (polite term for 'insane cackling'). Hence the question's limitation to IDEs, cf 'editors'! Also: I'm talking 'PyCharm' because of the story, but others use Codium, Sublime Text, etc - which presumably offer equivalent features.
Was helping a friend install PyCharm. Jumped into the Settings. Isn't it incredible how many there are?
Idly noted that there are two short-cut or macro-expansion types of facilities:
- Postfix Completion, (nothing to do with email or polish notation) and
- Live Templates (again, we're not talking about jinja2)
With both, one types an abbreviated-name and the IDE will expand it into appropriate code. For (LiveTemplate) example, typing compli and pressing
Tab induces PyCharm to add the following to the program[me]:
   [ ! for ! in !drop-down menu! if ! ]
It offers further typo-saving through the drop-down menu which lists a
bunch of likely (iterable) candidates from amongst previously-written
code. The action continues after selecting from the menu, by inviting completion of the other ("!") placeholders, in-turn.
I haven't made use of such a tool, to-date - OK, yes, I have practised a high typing-speed (and accuracy). Puff, puff...
Also, at the time, I'm thinking in 'code', rather than about what tool
might implement said ideas.
Do you make use of such expansionist-tendencies?
Do you make use of other powerful features within the IDE, or are its
editor functionalities employed at pretty-much the NotePad level?
Do you make use of your IDE's expansionist tendencies, and if-so, which
ones?
NB this is where vi/emacs enthusiasts start chuckling (polite term for 'insane cackling') ...
I haven't made use of such a tool, to-date - OK, yes, I have practised a
high typing-speed (and accuracy). Puff, puff...
Also, at the time, I'm thinking in 'code', rather than about what tool might implement said ideas.
It is a long, long, time since I've thrown one of these into the
maelstrom of our musings.
(have the nightmares receded?)
Do you make use of your IDE's expansionist tendencies, and if-so, which
ones?
NB this is where vi/emacs enthusiasts start chuckling (polite term for 'insane cackling'). Hence the question's limitation to IDEs, cf 'editors'! Also: I'm talking 'PyCharm' because of the story, but others use Codium, Sublime Text, etc - which presumably offer equivalent features.
Was helping a friend install PyCharm. Jumped into the Settings. Isn't it incredible how many there are?
Idly noted that there are two short-cut or macro-expansion types of facilities:
- Postfix Completion, (nothing to do with email or polish notation) and
- Live Templates (again, we're not talking about jinja2)
With both, one types an abbreviated-name and the IDE will expand it into appropriate code. For (LiveTemplate) example, typing compli and pressing
Tab induces PyCharm to add the following to the program[me]:
   [ ! for ! in !drop-down menu! if ! ]
It offers further typo-saving through the drop-down menu which lists a
bunch of likely (iterable) candidates from amongst previously-written
code. The action continues after selecting from the menu, by inviting completion of the other ("!") placeholders, in-turn.
I haven't made use of such a tool, to-date - OK, yes, I have practised a
high typing-speed (and accuracy). Puff, puff...
Also, at the time, I'm thinking in 'code', rather than about what tool
might implement said ideas.
Do you make use of such expansionist-tendencies?
Do you make use of other powerful features within the IDE, or are its
editor functionalities employed at pretty-much the NotePad level?
In general, I don't like a lot of popups and code completions, so I
tend to avoid them. I don't even like automatic parens or brace
insertion.
They distract me, and often put the cursor somewhere I don't want it.
Of course, for Python code I do like automatic indentation after a
colon: if the cursor ends up in the right place, then I'm happy.
If I'm using a plain editor, then I usually like EditPlus. It's not
free but the cost is low and it's well worth it (but Windows only).
It knows about file types, and can do various insertions and
completions if you want (as I said, I mostly don't). I also use
Notepad++, but I more often go with EditPlus.
What I find more useful is matching brackets/parens/braces. Not
inserting them but highlighting or (better) jumping to the matching one
when asked.
Do you make use of your IDE's expansionist tendencies, and if-so, which
ones?
What I find more useful is matching brackets/parens/braces. NotThat is very helpful indeed.
inserting them but highlighting or (better) jumping to the matching
one when asked.
On Fri, Mar 17, 2023 at 02:05:50PM +0100, Roel Schroeven wrote:
Even better than simply highlighting is (IMO) a thing called "Rainbow
Braces" or "Bracket Pair Colorization" I recently learned about: both
braces of a matching pair get the same color, while other pairs get
other colors. I have to say I like it quite a lot. It's in VS Code
these days; possible there are implementations or extensions for other
editors and IDEs as well.
VS Code also supports ‘semantic highlighting’: Instead of simply highlighting syntax, highlight the same identifiers in the same colours,
with the aim of helping you see them through the flow of the code.
Even better than simply highlighting is (IMO) a thing called "Rainbow
Braces" or "Bracket Pair Colorization" I recently learned about: both
braces of a matching pair get the same color, while other pairs get
other colors. I have to say I like it quite a lot. It's in VS Code
these days; possible there are implementations or extensions for other >editors and IDEs as well.
On 3/17/2023 9:38 AM, Simon Ward wrote:
On Fri, Mar 17, 2023 at 02:05:50PM +0100, Roel Schroeven wrote:
Even better than simply highlighting is (IMO) a thing called "Rainbow
Braces" or "Bracket Pair Colorization" I recently learned about: both
braces of a matching pair get the same color, while other pairs get
other colors. I have to say I like it quite a lot. It's in VS Code
these days; possible there are implementations or extensions for
other editors and IDEs as well.
VS Code also supports ‘semantic highlighting’: Instead of simply
highlighting syntax, highlight the same identifiers in the same
colours, with the aim of helping you see them through the flow of the
code.
Even with a simple "Find" command I don't like that behavior, let alone
for programming. I find that all those other marked instances make it harder for me to read the surrounding material. They are good for
moving from one instance to another, but otherwise they get in the way
for me.
For templating, I have two Python programs for starting new work. One generates a standalone Python program with the Python shebang, a
__main__ which calls def main(), and logging and argparser
intialization. The other generates a pyproject.toml /setup.cfg
directory structure with a main.py referenced as a console
script. from setup.cfg
From: Python-list <python-list-bounces+gweatherby=uchc.edu@python.org> on behalf of dn via Python-list <python-list@python.org>
Date: Thursday, March 16, 2023 at 6:59 PM
To: 'Python' <python-list@python.org>
Subject: Friday finking: IDE 'macro expansions'
*** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. ***
It is a long, long, time since I've thrown one of these into the
maelstrom of our musings.
(have the nightmares receded?)
Do you make use of your IDE's expansionist tendencies, and if-so, which
ones?
On 2023-03-18 at 11:49:24 +0000,
"Weatherby,Gerard" <gweatherby@uchc.edu> wrote:
For templating, I have two Python programs for starting new work. One
generates a standalone Python program with the Python shebang, a
__main__ which calls def main(), and logging and argparser
intialization. The other generates a pyproject.toml /setup.cfg
directory structure with a main.py referenced as a console
script. from setup.cfg
You don't describe the process for using those programs, but if you
"have two Python programs," then it sounds like you're *not* using the IDE/editor for that.
(I'm not judging, I'm trying to relate your answer to dn's original question.)
For an opposing view, I'm much more likely to copy an old project (at
the command line, often with sed) and then use my editor to morph it
into a new project. IME, unless there's an imposed process, those
templates and programs tend to experience bitrot, whereas going back to
an old program gives me the chance to keep it up to date w.r.t. what
I've learned more recently, which helps reinforce said learning.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 73:58:22 |
Calls: | 6,714 |
Calls today: | 2 |
Files: | 12,246 |
Messages: | 5,357,271 |