pulsar-edit / pulsar

A Community-led Hyper-Hackable Text Editor
https://pulsar-edit.dev
Other
3.12k stars 130 forks source link

Document how to disable ctrl-c and ctrl-x when no text is selected #1009

Open tovrstra opened 2 months ago

tovrstra commented 2 months ago

Have you checked for existing feature requests?

Summary

This is a follow-up of https://github.com/atom/atom/issues/7103

I guessed the following in keymap.cson would work, but it does not for ctrl-x. (It works for ctrl-c.):

'atom-text-editor':
  # mac os
  'command-c': 'editor:copy-selection'
  'command-x': 'editor:cut-selection'
  # linux and windows
  'ctrl-c': 'editor:copy-selection'    
  'ctrl-x': 'editor:cut-selection'

There seems to be no cut-selection command or it has a different name, which I'm not aware off.

What benefits does this feature provide?

I can imagine Pulsar developers would like to appeal to a broader audience. The default behavior of ctrl-c and ctrl-x is annoying to those who are not used to it. Any new user bumping into this frustration without an easy to find solution will probably give up early, which is a shame.

Any alternatives?

Even better would be to change the default behavior of ctrl-c and ctrl-x, but I guess this is a matter of taste.

Other examples:

No response

savetheclocktower commented 2 months ago

You're right — either that should be a configurable setting or there should exist less opinionated versions of both Copy and Cut.

The easiest solution would be to add an editor:cut-selection command, so I'll see if we can get that added.

Thanks for the report!