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

WYSIWYG-like keyboard shortcuts in Markdown #850

Closed
cassidyjames opened this issue Jul 24, 2020 · 4 comments · Fixed by #890
Closed

WYSIWYG-like keyboard shortcuts in Markdown #850

cassidyjames opened this issue Jul 24, 2020 · 4 comments · Fixed by #890
Labels
Needs Design Waiting for input from the UX team Priority: Wishlist An enhancement or feature request

Comments

@cassidyjames
Copy link
Contributor

cassidyjames commented Jul 24, 2020

When editing a Markdown README file or blog post, it would be handy to be able to use some familiar/standard WYSIWYG or word-processor-like keyboard shortcuts for text formatting:

  • Ctrl+B for bold (**strong**)
  • Ctrl+I for italic (_emphasis_)
  • Ctrl+K for link ([text](url))

For a great implementation, pressing the key should insert the characters and put the cursor where the user would most likely type next (i.e. between the ** or _, or in the [] of a link), while hitting the shortcut with selected text should wrap the text with the formatting characters. This is how GitHub—which users of Code are likely to be familiar with—handles it in their Markdown inputs.

This might be best implemented in an optional plugin.

@cassidyjames cassidyjames added Priority: Wishlist An enhancement or feature request Needs Design Waiting for input from the UX team labels Jul 24, 2020
@igordsm
Copy link
Sponsor Contributor

igordsm commented Sep 30, 2020

I would like to work on this. Besides these shortcuts, how about using Ctrl+1 (up to Ctrl+6) for headings?

@cassidyjames
Copy link
Contributor Author

I'm not sure if those would conflict with anything else, like changing tabs. I think the listed ones would be a good start, and we can always expand.

@jeremypw
Copy link
Collaborator

jeremypw commented Oct 1, 2020

For info there is a list of current shortcuts here: https://github.com/elementary/code/wiki/shortcuts

@igordsm
Copy link
Sponsor Contributor

igordsm commented Oct 2, 2020

So it seems like Ctrl + i is taken for Go to Line. I implemented using Ctrl+Shift+I and it works fine. I'm sending a PR right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Waiting for input from the UX team Priority: Wishlist An enhancement or feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants