- This topic has 10 replies, 2 voices, and was last updated 5 years, 9 months ago by Vitali.
-
AuthorPosts
-
VitaliParticipantHi.
How to set up formatter for .ts files with CodeMix?
For example TAB size. editor.tabSize = 2.0
When I press TAB it inserts 2 spaces but after BACKSPACE it removes 4 spaces.
And when I press Ctrl + Shift + F it does not reformat it to 2Thanks.
support-swapnaModeratorVitali,
You can customize the formatting settings and the spaces to tabs or vice versa here : Window > Preferences > CodeMix > Settings > Workspace Settings
Please refer to my response here about customizing the formatting settings and editor tab/space settings :
https://www.genuitec.com/forums/topic/formatting-options/You can type ‘typescript.format’ in the Workspace Settings filter box to get all the TS related formatter settings.
Hope this helps. Please let us know how if you have any further questions.
–Swapna
Genuitec Support
VitaliParticipantHello Swapna.
I have read your response about tab/space settings and opened ‘typescript.format’ in the Workspace Settings but it does not help with Ctrl + Shift + F or BACKSPACE.
Thank you.
support-swapnaModeratorVitali,
Sorry that you are still seeing problems with the formatter.
Can you please clarify if you have installed any other extensions for formatting, example: Prettier? It is possible, the additional extension’s settings for formatting might have taken precedence.
Please share with us details of any additional extensions that you have installed. You can get the list of installed extensions from Help > CodeMix Extensions page.
–Swapna
Genuitec Support
VitaliParticipant
support-swapnaModeratorVitali,
Thank you for the details.
1. Can you please clarify if you are only using our CodeMix packs and did not install any other extensions yourself (using the .vsix file)? We were able replicate the formatting problem only when there is an additional formatter extension installed.
2. Can you please check if you are seeing this problem in a new workspace as well?
3. Please go to Window > Preferences > CodeMix > Settings > Workspace Settings, type ‘tab’ in the filter box and send us the screenshot of the results to help us check if there are any other settings involved.
–Swapna
Genuitec Support
VitaliParticipantHello Swapna
1. I don’t use any other extensions. I even didn’t know about possibility to install them usinf .vsix file.
2. I have created new workspace and .ts files behaviour is the same – Ctrl+ Shift + F does not work. Tab works 2 chars on TAB and 4 chars on BACKSPACE
3. Here is a screenshot in attachment.With .js files formatting and tabs works correctly.
Attachments:
You must be logged in to view attached files.
support-swapnaModeratorVitali,
Thank you for the clarification and the screenshot.
Can you please set theeditor.detectIndentation
to false (it is true by default) in the Workspace Settings page and see how it works? Also share with us your OS and version details.–Swapna
Genuitec Support
VitaliParticipantHello Swapna.
Seems with editor.detectIndentation = true formatting and TAB work correctly.
OS version is Windows 7 Service Pack 1
support-swapnaModeratorVitali,
Glad that the formatting works now.
Please let us know if you see any other issues with CodeMix.–Swapna
Genuitec Support
VitaliParticipantThanks Swapna.
-
AuthorPosts