Skip to content

Editing shortcuts and keybindings #53

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

Merged
merged 2 commits into from
Jul 20, 2017
Merged

Conversation

felipeochoa
Copy link
Contributor

This PR adds a few keybindings that automate some common JSON edition operations:

  • C-c C-t: Toggle between true and false at point

    1. before: "options": {"alwaysInclude": |true, ...}
      after: "options": {"alwaysInclude": |false, ...}
    2. before: "options": {"alwaysInclude": |false, ...}
      after: "options": {"alwaysInclude": |true, ...}
  • C-c C-k: Replace the sexp at point with null

    1. before: "options": {|"alwaysInclude": true, ...}
      after: "options": null|
    2. before: "question": {"number": |5, "type": "number"},
      after: "question": {"number": null|, "type": "number"},
    3. before: "question": {"number": 5, "type": "nu|mber"},
      after: "question": {"number": null, "type": null|},
  • C-c C-i: Increment the number at point
    before: "question": {"number": |5, "type": "number"},
    after: "question": {"number": |6, "type": "number"},

  • C-c C-d: Decrement the number at point
    before: "question": {"number": |5, "type": "number"},
    after: "question": {"number": |4, "type": "number"},

felipeochoa and others added 2 commits July 19, 2017 11:19
- `C-c C-t`: Toggle between `true` and `false` at point
- `C-c C-k`: Replace the sexp at point with `null`
- `C-c C-i`: Increment the number at point
- `C-c C-d`: Decrement the number at point
@joshwnj joshwnj merged commit 32d5a9b into json-emacs:master Jul 20, 2017
@joshwnj
Copy link
Collaborator

joshwnj commented Jul 20, 2017

@felipeochoa thanks!

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.

2 participants