I am a fresh new user of Atom, as I was looking for a way to edit easily all my (sometimes rather long) markdown files in a git folder project.
I am French and I write novels, so I need to have some french typo in my markdown :
a En Dash (U+2013) “–” followed by a No-break space (u+00A0) when beginning a new line of dialogs ;
a Horizonal Ellipsis (U+2026) “…” instead of three dots ;
a Left-pointing double angle quotation mark “«” (u+00AB) followed by a No-break space (u+00A0) when beginning dialogs.
a Right-pointing double angle quotation mark “»” (u+00BB) followed by a No-break space (u+00A0) when closing dialogs
I have found a way to add shortkeys, ie for nbsp I have added in my init.coffee:
atom.commands.add 'atom-text-editor', 'custom:insert-nbsp': -> atom.workspace.getActiveTextEditor()?.insertText(' ')
and then, in my keymap.cson :
'atom-workspace atom-text-editor': 'shift-space': 'custom:insert-nbsp'
But I would like to have this replacements to be automatics, ie :
- when I am at the beginning of a line, if I type “-” It will replace it with En-Dash and nbsp ;
- when I type " It will replace by an opening or closing « or » and the included nbsp.
If someone can show me how to do that, or if there is a plugin doing that, I would really appreciate.