Search code examples
version-controlsapling

sapling: How to change the commit editor


Meta's new Sapling SCM looks interesting, but can you change the commit editor, to e.g. vscode?

I can't find anything editor related in sl config.


Solution

  • Admittedly, config options need to be documented on the Sapling website. Until then, looking at historical Mercurial documentation is a good proxy.

    For example, in this case, the config you want to set is ui.editor, just like in Mercurial. Though note that in the specific case of VS Code, you likely want to include the --wait flag, so I would set it as follows:

    sl config --user ui.editor "/usr/local/bin/code --wait"