Get 'Show Wrap Guide at Column' Value

As far as I can tell it is currently not possible to read the value of Settings > Editor > Display > Show wrap guide at column. I’d like the ability to do this as currently I need to add a redundant setting to the extension I am making.

1 Like

This would be useful to me as well … this can influence automatic formatting or validation for example. In fact, I’d also like to be able to influence this value from my extension.

1 Like

It is possible to read an app’s preferences via terminal command.

For nova do: defaults read com.panic.Nova

This lists all of the available preferences in Nova. Make sure it’s Nova with a capital N.

To read a specific preference do defaults read com.panic.Nova WrapGuideColumns

This will return the number of wrap guide columns.

If you want to change a preference, do: defaults write com.panic.Nova WrapGuideColumns -array 99

This will set the wrap guide columns to 99. We had to use the --array flag for this particular option because the number happens to be stored as an array.

You can run terminal commands from a Nova extension by using the Process class

Interesting approach, thanks. Just to note… it looks like WrapGuideColumns does not show in the preference file as a key when set to the default 80 columns.

This definitely works, but I feel it’s a bit hacky and would still prefer the API to allow an official method to read ALL preferences.