25
DOES THE WORLD END IF YOU STOP USING VISUAL STUDIO? Hint: No.

Alt Dot Net Usergroup: Does the world end if you stop using Visual Studio?

Embed Size (px)

Citation preview

  • 1.Does the world end if you stop using Visual Studio?
    Hint: No.

2. Who Am I?
Garry Stewart
I do tehsoftwarez
Contact me
[email protected]
@garry_stewart
http://www.garry-stewart.com/
3. IDE Addicition
General text editing
Syntax highlighting
Intellisense
WYSIWYG Editors
Visualisation tools
Code generation
Build management & compilation
Code navigation
File management
Source control
Integrated debugging
Etc
4. This used to be Less Complicated, Right?
5. So lets All Develop In Notepad!
6. Whats the Alternative?
+
==
7. Before We Start..
Current directory is king
%PATH% matters
Command line tools are your friend
8. There are these things called modes
Lots of different modes
Insert
Visual
Normal
And More!
You will spend most of your time in Normal mode.
You cannot enter text in this mode
9. 10. Basic Editing
:help operator
:help scrolling
Everything has a count
5dw == delete the next 5 words
Rinse and repeat
. Repeats the last command
11. Stuff to Get Into if We Have Time
:help buffers
Syntax highlighting
Creating functions and macros
Refactoring
Spell checking
12. Ultimate Power
Fully scriptable
On the fly via commands
Plugin architecture
Built in Regex engine
Reassign key commands
Interact with the command line
Macros
No COM required to create extensions!
13. Navigating Code
:help various-motions
Currently broken for C# if you have a namespace
Its all just regex, so we can extend this to work with
14. Interacting With The Command Line
:! == execute a command (opens a new window)
:r ! == read the output of the console operation into the current buffer
Have a custom function in my _vimrc to print output in a new window
15. QuickFix
QuickFix == list of search results with file navigation
:copen or :cw " Open the quickfix window
:ccl " Close it
:cn" Go to the next error in the window
:cnf " Go to the first error in the next file
:colder " Look at older results
:cnewer" Look at newer results
Global to all windows
16. QuickFix Example: Find In Files
:vimgrep (or :grep if you have the actual program)
Fills the QuickFix list
:vimgrep /[pattern]/[g][j] {file}
E.g. :vimgrep /public/j ./**/*.cs
[g] == Include ALL results as separate lines
[j] == Dont jump to first result
Can also use :lvimgrep (or :lgrepif you have the actual program)
Fills location list which is local to current window
Use :lw or :lopen to see this
:lolder and :lnewer to navigate search result history
17. Building a Project
:make
Uses makeprg to tell what to execute
MSBuild in my case
Uses errorformat to parse build output for errors
Redirects errors to QuickFix window
Equivalent of Visual Studios build error list
18. Source Control Integration
Didnt we already cover this with command line integration????
Im using git
RunShellCommand to the rescue again!
19. Markers
Basically bookmarks
Some set by Vim functions
Can be set by you
:help mark-motions
20. Tags
Build them using Exuberant Tags (ctags.exe)
:tag
Jumps to a tag
:tags
Gives a list of all tags
CTRL-g == navigate
g] == list
Sets a mark upon navigation
Allows you to return to the same spot
21. Code Completion
Sort of works
Cant get it working like Intellisense with C#
Works fine in C/C++/Java/Pretty much anything else
Several types of completion
Omni Completion
In File completion
Many more..
22. Extensions
Huge plugin community
Some samples
:NERDTree
Basically Solution Explorer
:TlistToggle
Class view using Tags
23. Folding Code
Yes, you can do it
No, I havent looked at it
Think of this as an equivalent to #region
Regions are evil
Useful when building plugins
NERDTree and TagList both use it
24. Next Steps
Get intellisense working properly
Or just learn the BCL
Generate tags from BCL source code
Try to get command line debugging working via Shell calls and the Quickfix list
Start creating refactoring and code generation functions
E.g. extract method, create controller
Take a look at http://vim.wikia.com/wiki/Vim_as_a_refactoring_tool_and_some_examples_in_C_sharp
25. Closing Thoughts