Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Sublime Text word/subword movement with alt/ctrl #4075

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Use Sublime Text word/subword movement with alt/ctrl #4075

wants to merge 1 commit into from

Conversation

dayorbyte
Copy link

The only per-word movement in the existing sublime controls is sub-word, but it uses the full word keyboard shortcuts. This PR switches the alt shortcut to be full word and adds ctrl as subword to sync up with Sublime's defaults

@marijnh
Copy link
Member

marijnh commented Jun 20, 2016

You once again changed the behavior in a way that breaks the default linux bindings. I'm going to hold off merging/fixing this until someone can point me at defining information about per-platform bindings for ST. Unfortunately, and bafflingly, no such thing seems to exist online (at least in the first page of google results)

@dayorbyte
Copy link
Author

I'll see what I can find. Worst case I might be able to bring VMs up to check manually since the changes aren't that complicated.

@marijnh
Copy link
Member

marijnh commented Jun 20, 2016

They are probably also in some JSON file in the ST distribution tarballs.

@dayorbyte
Copy link
Author

windows: https://gist.github.com/jeffjenkins/092d5df2baf5c7e384bca23061b6a96f

ctrl+alt+{up,down}

linux: https://gist.github.com/jeffjenkins/5c53c90c897d3796f9a150abc42c01a2

alt+shift+{up,down}

osx: https://gist.github.com/jeffjenkins/1900171a7801432d6a91903f5497abab

ctrl+shift+{up,down}


I had (naively, it seems) assumed that linux and windows would be the same. I can make a fix for this, but I need to know two things:

  • What's the most official way to check for linux vs mac vs windows?
  • should I amend the existing commit and overwrite my branch so this is a single commit or add another commit with the next changes? This is the first time I've made changes to a pull request, so I'm not sure what the preferred flow is

@marijnh
Copy link
Member

marijnh commented Jun 20, 2016

The main library is recognizing windows with /win/i.test(navigator.platform), so I guess you could use that, the existing mac check, and just call everything else 'unix'? That's not super accurate, but close enough for this purpose, I think.

I do prefer to get a single patch (use amend or rebase), but if you're having trouble I can also do the squashing myself.

@dayorbyte
Copy link
Author

Great, thanks! I'll get this together and update later in the week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants