Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

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

915 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

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

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

×