jakob / Postico

Public issue tracking for Postico
https://eggerapps.at/postico/
475 stars 9 forks source link

Multi-Cursor Support #857

Open christiaanwesterbeek opened 1 year ago

christiaanwesterbeek commented 1 year ago

I'd like to request multi-cursor support in the Postico editor. This feature, available in many modern IDEs, allows for editing multiple lines or areas simultaneously. Adding this to Postico would align with the tool's goal of efficient database management and streamline repetitive editing tasks.

qwesda commented 1 year ago

Yes this would be a great feature indeed. I constantly find myself wishing for the same text editing features as my primary text editor. But the question will be what keybindings to use (sublime text, vscode, vim, jetbrains, ...)

jakob commented 1 year ago

I agree that this would be very nice. Multiple selections are already supported, but you can't really do much with them.

The problem is that NSTextView doesn't support multiple cursors. I'm not sure how easy it is to add that.

What I personally do when I need multi cursor editing is to just open the file in TextMate.

qwesda commented 1 year ago

I do the same (just with sublime text), but it is quite a chore ...

maybe option-clicking on the file could open the file in the default system default application?

I don't think adding multi cursor support yourself makes a lot of sense, you'll end up writing a complete text editor. I think the only way to go would be using a lib that already handles that.

jakob commented 1 year ago

I do the same (just with sublime text), but it is quite a chore ...

  • right click to open context menu
  • click on "show in finder"
  • figure out on which of the three screens the finder window decided to open
  • open the file in the text editor of choice ...

There is already a way to do it: You can drag the file from the sidebar to the text editor icon in the dock to quickly open it in a text editor.

maybe option-clicking on the file could open the file in the default system default application?

I was thinking of adding an "Open with ..." command to the context menu, since that is the usual way to do it. Maybe have the list of editors configurable in Postico settings (I'm not sure if Postico can autodetect installed text editors since it is sandboxed)

n-splv commented 9 months ago

+1 this would be super-useful. Could you maybe look into some solutions like https://github.com/gnachman/MultiCursor?tab=readme-ov-file