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
It's seeminly not what this plugin meant to do but it's a very low-hanging
fruit. I can easily add this as a vimrc option (in a vim-compatible way)
the next time I work on the plugin, or feel free to open a PR.
…On Tue, Dec 1, 2020, 09:34 Vesa Vänskä ***@***.***> wrote:
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?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACRZ2YH5WS5I7UTVM6LIXL3SSSMBHANCNFSM4UIUFIBQ>
.
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
Yeah, seems like this would do the trick :)
…On Tue, Dec 1, 2020 at 9:18 PM Vesa Vänskä ***@***.***> wrote:
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);
}});
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACRZ2YEMMM52T3E2VWUKSTLSSU6QTANCNFSM4UIUFIBQ>
.
esm7 commented
I incorporated this into the plugin in version 0.2.1 😎