js环境搭建
Hi,
Finally we get the Visual Studio license, so everyone should have the professional version right now. It’s a good chance to improve our productivity even more!
l Install extensions
Everybody should install the following extensions in your visual Studio! No exception!
- 1. Web Essentials 2013 for Update4
- 2. VSCommands for Visual Studio 2013
- 3. Productivity Power Tools 2013
- 4. Indent Guides
- 5. ResXManager
- 6. DocStubsJs
- 7. Visual Studio Spell Checker
If you have never installed any extension neither, please click the menu "TOOLS / Extensions and Updates", and click "Online" tab in left, then you can find them there.
After you have installed them, please do some configurations about them.
- Click menu: Tools -> Options -> Productivity Power Tools
- Turn off some features in below picture, to preserve your own development habits.
- Click “PowerCommands” in left, and make sure “Format document on save” is checked.
- Click the “DocStubsJs” in left, and configure like below. Especially the highlight lines. Also pay attention to other lines if you have different values.
l Install JavaScript code snippets
Please install the snippets to your visual studio to increase development productivity. Find the code snippets in attachment. If you have never tried code snippet before, please do it like this. Select some codes in text editor, and press Ctrl+K,S combination shortcut key, and choose one snippets.
Please copy the files and paste them into {Visual Studio directory}\JavaScript\Snippets\1033\JavaScript, and overwrite all. Note that the snippets are written for VS2012 and VS2013, don't install them for VS 2010.
The code snippets for C#, should be installed to {Visual Studio directory}\VC#\Snippets\1033\Visual C#.
l Install an excellent font (Optional)
I want to introduce a wonderful development font to you, Source Code Pro, which is developed by Adobe and open source. It shows code better than your current Visual Studio default font. It's a monospaced font (等宽字体), and you can easily recognize similar characters, such as 1-l-I, 0-O. It shows codes in a proper size, neither too small nor too big, not like default font. You can find it in attachement.
To install them please copy all *.otf files into c:\Windows\Fonts.
Then open your Visual Studio, and open the “Options” dialog. Expand to Environment - Fonts and Colors menu on left. On right side, choose the font “Source Code Pro”. The normal size is 10.
l Configure your Visual Studio options
- 1. CSS Formatting
The CSS codes should be formatted in compact format. See the picture below. The css rules should be shrunk in one line and the different levels should be well indented when you press Ctrl + K, Ctrl + D combination shortcut key.
Please configure your Visual Studio by the following steps.
Step 1:
Step 2:
Step 3:
- Change the text intent of XML files
To unify the text intent of all team members, please configure the highlighted numbers to 2, if your value is different.
- 3. C# - using directives sorting
Mark the checkbox, so that all “System” using directives always at top.
Best Regards
Fengbao Li / Technical Lead Phone: +86 131 2471 7568 |