How do I change the default characters used to italicize text by the markdown-writer package?


#1

Hi,

I love the markdown-writer package, but I would prefer that instead of using single underscores (_) on either side, to italicize selected text (which it does when one presses Ctrl+I) it used single asterisks (*) on either side of the text (sort of like how this package uses double asterisks either size of selected text to bold it when the right keyboard shortcut is pressed). I know how to get this behaviour by modifying the files belonging to the markdown-writer package itself (e.g., see this fork of mine that does this), but I would like to know if there was another way to do this by, perhaps, modifying the ~/.atom/config.cson file of Atom.

Thanks for your time,
Brenton


#2

You can manually edit your atom’s config.cson, there should be a markdown-writer key, in the key, overwrite any fields you wanted. This edit applies globally.

The list of over-writable fields are listed in https://github.com/zhuochun/md-writer/blob/master/lib/config.cson

If you want project specific configs, there is a command Markdown Write: Create Project Configs, which create a config in project, the plugin will pick it up if found.


#3

Where does this markdown-writer key go? Under core, extra, or somewhere else? This is my config.cson:

"*":
  core:
    allowPendingPaneItems: false
  editor:
    invisibles: {}
  "exception-reporting":
    customFileTypes:
      ".yml$": "toggle-soft-wrap"
    userId: "20e33b17-b6ee-be85-6d79-5468d2ceffbc"
  "rss-ticker":
    feed: "https://aur.archlinux.org/rss/"
    fileTypes:
      emacs: "source.lisp"
      spacemacs: "source.lisp"
  welcome:
    showOnStartup: false
".basic.html.text":
  editor:
    softWrap: true
".source.yaml":
  editor:
    softWrap: true

like I am thinking of adding something like:

'markdown-writer':
  textStyles:
    italic:
      before: "*", after: "*"

to it.


#4

@zhuochun Thanks for your answer that I should add:

  "markdown-writer":
    textStyles:
      italic:
        before: "*", after: "*"

to my config.cson under "*". I am re-iterating your response here in case someone else comes across and wonders what happened.