avis
1
I have āIndent Unitā set to 4 in Inkdrop and TAB is entered as Space x 4.
However, when I copy and paste a code snippet from another editor, the tab does not expand into a space, but remains \t
, which is Space x 2.
I have to readjust the indentation in Inkdrop every time.
I think it would be appropriate if pasted tabs were also rendered according to the āIndent Unitā.
Info
- Platform: (Windows)
- Platform version: (10)
- App Version: (5.3.1)
Reproduce
Copy and paste code or documents that contain tabs.
craftzdog
(Takuya Matsuyama)
2
Hey Avis,
Let me answer after the paternity break!
avis
3
Congratulations on that!
Iām not in a hurry, so itās okay.
craftzdog
(Takuya Matsuyama)
4
CodeMirror has an option tabSize
: https://codemirror.net/doc/manual.html#option_tabSize
So, itād be nice to support it instead of converting tabs into spaces.
avis
5
Thank you for your answer.
Do you have any plans to support this in inkdrop?
craftzdog
(Takuya Matsuyama)
6
Iām currently working on the mobile app.
You can specify it with init.js like so:
inkdrop.onEditorLoad(() => {
var cm = inkdrop.getActiveEditorOrThrowError().cm
cm.setOption('tabSize', 2)
})
avis
7
Thanks, that was very helpful.
I am now able to adjust the CodeMirror settings.
I no longer need to rework the snippet after I put it up.
However, it doesnāt match the settings in Inkdrop, so hopefully this will be improved someday.
1 Like
craftzdog
(Takuya Matsuyama)
8
Yes, itāll be supported in the next release!
1 Like
craftzdog
(Takuya Matsuyama)
9
Itās now supported in v5.4.0
1 Like