Do you hate editing text or code in Visual Studio's default text editor?  I know I do.  I was looking for a way to use Sublime Text 2 inside of VS2013 and, while I couldn't find a way to do that, I did find a way to open a file from VS in Sublime with the same cursor location in both editors.


This is something my buddy, Jason Meisel, showed me:
Visual Studio 2013's External Tools Dialog [Tools->External Tools...]


The last step after this was adding a keyboard shortcut, to quickly launch my external tool (Open in Sublime):


Visual Studio 2013's Keyboard Options Dialog [Options...->Environment->Keyboard]

The Tools.ExternalCommand# corresponds to the External Tools menu contents dialog and can be configured to launch on a keyboard shortcut.

Now, whenever I'm coding in Visual Studio--using their amazing intellisence--and need to do some mass text editing, I press Shift+Space to open up a Sublime Text 2 window at the same location I was editing in Visual Studio.

Pretty neat!

Resources:

Sublime Text - Command Line: http://www.sublimetext.com/docs/command-line
Managing External Tools in VS: http://msdn.microsoft.com/en-us/library/76712d27.aspx
Arguments for External Tools in VS: http://msdn.microsoft.com/en-us/library/ekbzk5f8.aspx

Categories: , , ,

Leave a Reply