esm7/obsidian-vimrc-support

Setting tabSize

vesan opened this issue · 4 comments

vesan commented

I would love to be able to set the tabSize option: https://codemirror.net/doc/manual.html#option_tabSize

Do you see setting that being a feature of this plugin? Or enable to set other CodeMirror configuration options also?

esm7 commented
vesan commented

So it would be something like this next to the clipboard option definition?

CodeMirror.Vim.defineOption('tabstop', 4, 'number', [], (value, cm) => {
	if (value) {
		cmEditor.setOption('tabSize', value);
		console.log('Vim is now set to use tabSize ' + value);
	}
});
esm7 commented
esm7 commented

I incorporated this into the plugin in version 0.2.1 😎