VS2008 Removes my Indentation in .js file

筅森魡賤 提交于 2019-12-08 05:09:40

问题


I'm working with ExtJs framework and so have to code a lot of JS in vs2008, however, VS2008 keeps removing my indentation and its driving me nuts.

How do I remove the "auto-indent" feature? Thanks


回答1:


The simple answer is: Turn off the Automatic formatting in the Formatting tab

Extracted from the documentation here


JScript specific settings are available under the new Tools / Options / Text Editor / JScript node

These four tabs are:

General & Tabs

Options here are standard across all editors (including JScript)

Formatting

This tab was designed for JScript and contains the most of the JScript specific formatting features

Automatic formatting: This section refers to WHEN formatting will occur as the user is typing in and manipulating code in ‘real time’. Basically, formatting is being performed as the user is constructing the code.

  • Format completed line on enter (default ON): Once {ENTER} is pressed, the line will be formatted according to the options set
  • Format completed statement on ; (default ON): Once ; is pressed, the line will be formatted according to the options set
  • Format completed block on } (default ON): Once } pressed, the block will be formatted according to the options set
  • Format on paste (default ON): Once code is pasted into the editor, it will be formatted according to the options set

Miscellaneous

This tab is also JScript specific and contains validation rules as well as statement completion options



来源:https://stackoverflow.com/questions/605461/vs2008-removes-my-indentation-in-js-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!