spacemacs: multiple cursors (evil-mode) - spacemacs

Is it possible to configure multiple cursors in spacemacs in evil-mode? If so, how?
To be clear, I'm interested in a way to insert text at multiple points simultaneously.

Would evil-iedit-state work for you? Iedit state allows you to edit/insert/delete multiple occurrences of a particular word or pattern. It works within an entire file or just within a particular region. It doesn't work to edit multiple arbitrary points with nothing in common though.

Is evil-mc suit for you?
evil-mc provides multiple cursors functionality for Emacs when used with evil-mode.

Related

Is there a way to select multiple cursors between different groups in VSCode?

In VS Code we can split the screen into different groups. Is there a way to select multiple cursors between these groups? This would be useful to do scrolling between different files, for example
No, cursors can only be active in a single editor. I believe that https://github.com/Microsoft/vscode/issues/38893 tracks this feature request

pseudo-randomize stimuli list in PsychoPy

I want to set up a paradigm in PsychoPy. Pictures will be presented one after an other for 4s each.
There are 2 groups of pictures. All should be presented in a "pseudo" random order. How can I check that there are not more than 3 pictures of the same group in a row?
PsychoPy's Builder interface isn't well suited to implementing randomisation constraints: there are just too many possible things a user might want to do, so it is difficult to create a GUI to account for the possible approaches. The usual advice here is that you would need to use the Coder. Writing your own code allows you to implement any arbitrary randomisation scheme.
If that doesn't seem practical, you could hand-craft a number of conditions files that do what you want. e.g. in Excel, randomise a list of conditions. Check for runs > 3 and shift rows around to fix that. Make a set of such files (say, 5) and randomise each subject to use one of them as the conditions file for that particular session.

Processing text of SQL script

I want to develop tool which will prettify SQL scripts - make all special words and commands (SELECT, JOIN, FROM, etc.) upper/lower case; add square brackets; and couple other things (yes, ). I'm going to implement it as extension for my IDE or as external tool - I'm not decided it yet.
I was going to split a script by spaces, brackets, commas and periods - get separate words - and check each word to match to one of the keywords. If it matches - then capitalize/lowercase word depending on settings. If not - leave it as it was.
But then I thought that it may be other solutions.
I thought about using RegEx (unfortunately I don't know much about it). I suppose that it will work more efficient. And therefore using it will be more preferred.
Is RegEx the best way to achieve my goal? Or my initial approach is also appropriate?
Is there other ways?
P.S. I know that similar tools can already exist out there. And I will appreciate if you share them. But I want to implement my own tool for self-education reasons.

Distinct Row Templates for NSPredicateEditor/NSRuleEditor rows

I'm trying to figure out if it's possible to use different row templates for specific rows in an NSPredicateEditor (or, if need be, an NSRuleEditor). I've got a screenshot that I think helps me explain this more clearly.
In this contrived example, I only want people to generate a filter that looks for a specific path above a certain size. So, in Section A (the Any block), users can only specify path rules (and the users can add additional paths). In section B, I only want the Size option to be available.
Nothing's jumping out at me from the docs (or, the stuff that does jump out at me ends up being something else), but it seems like this is the sort of thing that might come in handy, which makes me think it might be possible.
From what I understand about NSPredicateEditor, this is not possible. You might be able to swing it if you do everything yourself with an NSRuleEditor, but I haven't played with that class as much.
So in a nutshell: if you implement it yourself, it's possible. With the built-in stuff, I'm 99.9% certain that it's not a configurable behavior.

Storing SQL in MySQL: Insert as Text?

Working in a team environment, each one of us has put together our own list of SQL statements that we use to help with our day to day job functions. As the case often is, there may be some redundancy with this, and we are often in need of each other's statements. To circumvent this, I'm looking to put together a small app that can be used to store and search for these SQL statements.
To begin with, I'm keeping it basic, just storing and searching the statements. This may build out to be the actual execution at some point in the future, but I'm not concerning myself with this at the time.
This will be built with PHP and MySQL - Should I store the SQL as text, or is there something that I need to be concerned with?
text should be fine.
you will also want a name (label) and possibly a descriptive field to let people know what it does in plain english.
Any particular reason these aren't just stored in the database as stored procedures?
Or in your version control system as scripts?