Jaa


Can You Use Visual Studio as Your Text Editor?

Most developers I know (including myself) use at least two text editors on their box, a full blown development environment like Visual Studio, and a lightweight editor (or mid-weight) like notepad.exe, Notepad++, Notepad2, vim, emacs, UltraEdit (my favorite), SlickEdit, EditPlus, TextPad, etc.

If you use Visual Studio, the question I pose is why not use it as your general purpose editor?  You laugh! (as have I), but I'm serious, what is actually blocking your adoption of VS as a general purpose text editor?  Not "what are you using", but why are you using another editor?  What am I missing or what rings a bell w/ you?

I'm now on the team that owns the general editing experience for VS and it hit me, why am I using UltraEdit for all my general purpose editing and VS for only managed code development?  The devs & people that come to my office to tweak my PC are using notepad.exe, why?  I believe VS should certainly be fully capable of behaving like a simple editor, and I think it's actually close, but not quite there yet, so why?  We're looking into features for the next version, so give me some hard reasons why...

The Blocking Issues

Here's what I believe people (including myself) think of VS as a simple text editor, please add to this list via comments:

  • Too Much Memory
    devenv.exe hogs system memory (>100MB).  UltraEdit takes 5.6MB, Notepad2 takes 2MB, notepad.exe takes 1.6MB, emacs v22.1 for Windows takes 9MB.
  • Startup Performance
    devenv.exe doesn't just 'pop' up like notepad.exe
  • Availability / Cost
    notepad.exe is available on every box, it is consistent and gets the job done.  Many editors are free.  Most editors take very little disk space, VS can take a lot.  I'm going to assume that you ARE using VS, so those don't count.
  • System Integration
    Note I know UltraEdit put a handy item in the windows explorer shell's context menu to open any file in the editor, this is nice (not on the "Open With" menu)
  • Syntax Highlighting
    VS does not support easy custom syntax highlighting, period.
  • Specialized Features
    Many editor have their own special features, UltraEdit has a "Favorites" list that I love, column editing mode (used rarely, but handy) etc.  UE also has a Spell Checker which I use all the time just to pop up the editor & copy/paste text from anywhere to check spelling.
  • Easy of Customization
    Some apps have easy to access menu options to just pop a new custom menu action off the main menu bar.  I find this handy.  Doing this in VS requires a lot more work.  What editor customization do you do?
  • Bloated with Windows
    Personally, I like my text editor to appear simple, real simple. No command bars, just a menu since I use keyboard shortcuts.
  • Simplicity & Easy of Use
    VS is big, no doubt about it.
  • Just Haven't Considered It Yet
    We've been using separate text editors so long that perhaps it hasn't even occurred to trying using one environment.  Or VS was so heavy in the past we abandoned the notion long ago.  I'm guilty of this.
  • Cross Platform
    If you work off a PC, learning one environment (like vim or emacs) is certainly easier.
  • Shortcuts
    Some of the VS shortcuts are not intuitive, like Ctrl-H for replace (instead of Ctrl-R).  Discovering them and be tricky and customizing them isn't the easiest.
  • Different Mindset
    Maybe VS is just for .NET/native code development and having a different editor separates the purposes in one's mind.  Certainly I believe it is apparent in the workflow of the text editor application.

Dispelling Some Myths

I've just started trying to use VS as my general purpose text editor, and this is what I've learned so far.  I feel I still have a a long ways to go, but it's a start.  What's missing?  In this case, I've been using VS 2008 Beta2.

  • Memory Usage
    When opening a .txt file, devenv.exe actually takes only 10MB of memory.  Still more than the others, but not too bad.
  • Startup Performance
    When opening a .txt file, devenv.exe actually pops up very fast.  Not as fast as notepad.exe, but certainly negligibly different.
  • Big Missing Features
    Sure there are some big things, like easy customization of syntax highlighting.  Others?
  • Easy Customization
    Well there are macros (w/ a recorder) in VS, you can even create new toolbars, menu items, etc and bind to the keyboard.  My next goal is to port my custom menus and actions from UltraEdit to VS to understand just how easy/hard it is.  What's been your experience with this?
  • Specialized Features
    I miss the "Favorites" list in UltraEdit and am having a hard time living without a built in spell checker.  What special features do you use in your editor VS doesn't have?
  • It's in the Details
    I'm finding lots of little behaviors I'm used to in my normal editors in which VS is different.  It breaks the smooth simple workflow I love.  Like all other editors start up with a blank new file, VS doesn't.  "New File" instantly creates a blank text file in other editors, VS has the additional step of choosing which type of file first (annoying!).  Double-clicking a tab in UltraEdit closes that file, nice.  What other details do you miss?
  • Bloated with Windows
    I was totally surprised when I opened a .txt file in VS, all those other windows disappeared, awesome!

I Want to Hear From You

So this post is not about how to adopt VS as your simple text editor, it's to find out why you don't use it as your basic editor.  Sure there are some big things, but workflow is made/broken by the little details, what are they?

References

Editor Screens

Just some screen shots of a few popular editors w/ a .txt file

Text Editor - Visual Studio 

Text Editor - Notepad 

Text Editor - UltraEdit

 Text Editor - emacs

Text Editor - Notepad2

Comments

  • Anonymous
    September 06, 2007
    I tend to use SciTE as my editor, for all the reasons you mentioned.

  • Anonymous
    September 06, 2007
    The comment has been removed

  • Anonymous
    September 06, 2007
    I use vs many a time as my texteditor as this lets me use only one editor for all my work. (By the way I a mostly work sith SP's also in VS only.) Many a time there are compelling reason for changing the editor, but on others we can use VS. I guess its also depends on situations. Vikram

  • Anonymous
    September 06, 2007
    The comment has been removed

  • Anonymous
    September 06, 2007
    The comment has been removed

  • Anonymous
    September 07, 2007
    I use notepad2 because I often want to have a separate window I can cut and paste in and out of in a separate monitor.  Maybe vs does this, just don't know how.  I also often use notepad2 as a scratch place to hold something I don't ever want to save and I'm afraid if I use vs for that it may accidentally save it. HTH's!  See you soon -Peter (going to redmond in a couple weeks for a wpf thing)

  • Anonymous
    September 07, 2007
    That's a clever question and I have to admit I've never thought to Visual Studio in this way, even if

  • Anonymous
    September 07, 2007
    That's a clever question and I have to admit I've never thought to Visual Studio in this way

  • Anonymous
    September 07, 2007
    Basically two reasons:

  • VS doesn't allow select squares.
  • VS doesn't have encoding conversion (e.g.: EBCDIC)
  • Anonymous
    September 07, 2007
  1. You don't get a seperate window for each file.
  2. If you have multiple copies of VS running, it will choose one at random.
  3. The file is hidden by the "Start Page"
  4. It doesn't work well in a multiple monitor scenario. (see 1) Speaking of which, when is VS going to support more than one monitor?
  • Anonymous
    September 07, 2007
    > If VS could do a Hex View of files, that would be extremely useful (like HxD).  And a hex view of strings when debugging. VS does have an hex editor. In fact, it is the only hex editor I ever use.

  • Anonymous
    September 07, 2007
    > VS doesn't allow select squares. What are select squares? Is that like holding the alt key while selecting text so you get an arbitrary block of text instead of whole lines?

  • Anonymous
    September 07, 2007
    > Btw, excellent idea, I hope you can release an editor based on VS's own editor. That might be part of VS Shell, which I heard was going to be free.

  • Anonymous
    September 07, 2007
    The comment has been removed

  • Anonymous
    September 07, 2007
    You can use CTRL-SHIFT-ARROW to select blocks of text.  Actually works in any Windows app.  Ctrl-Arrow skips but does not select words

  • Anonymous
    September 07, 2007
    The comment has been removed

  • Anonymous
    September 07, 2007
    The comment has been removed

  • Anonymous
    September 07, 2007
    The comment has been removed

  • Anonymous
    September 08, 2007
    Noah, startup performance is by far the biggest show stopper IMO. When using VS as a text editor, there should be a way to prevent the loading of add-ins and packages - those make sense when I'm intending to develop, but not when all I want to do is edit a file. Several times I regretted having double-clicked a .config or .cs file, only to wait almost a minute for devenv to boot up.

  • Anonymous
    September 08, 2007
    Wow, lots of GREAT feedback!  Thanks everyone.  Special thanks goes out for giving specific details of features you use and issues blocking your use of VS as an basic text editor.  I'll look into these further and see what we can do to at the least, improve the experience, and hopefully make VS rock as a general purpose text editor.

  • Anonymous
    September 10, 2007
    I use Notepad++ and DarkRoom for text. DarkRoom is just pure text editing and removes all the distractions from writing editing. Even Full Screen mode in VS doesn't lose everything. I use Notepad++ mostly when I want to "launder" text. For example, if I want to copy some text from a web page and paste them into a word file. A straight copy and paste includes all the formatting from the HTML. Laundering it through Notepad++ means I get just the text for me to do deal with as I want and not how Word thinks I want. Currently VS wants to work like word and until it doesn't, I'll use Notepad++ for that purpose. I also use Notepad++ because I can colorize the text based on file type and introduce custom schemes for different files.

  • Anonymous
    September 10, 2007
    Michael Ruminer on Team System 2008 Virtual Machine Naming Issue. Trent Nix on Its about time I Got the...

  • Anonymous
    September 22, 2007
    The comment has been removed

  • Anonymous
    September 27, 2007
    The comment has been removed

  • Anonymous
    October 15, 2007
    The comment has been removed

  • Anonymous
    October 16, 2007
    The comment has been removed

  • Anonymous
    November 19, 2007
    Believe it or not, column editing more is a big big thing for me.  UltraEdit has this perfected for me, so it's the general editor.  I've even been known to use if got managed code development, and only use the IDE for build (but only in the insane moments when Intellisence is annoying me).

  • Anonymous
    November 21, 2007
    Visual Studio 2005 DOES support column select mode or Block Select mode, for selecting a block of text and copying it/pasting it as a block Not only does it support that, but when you paste a block of text selected in block/column/whatever you want to call it mode, it's possible to have visual studio automatically tab-align the code for you in a neat column The way you use block select mode in Visual Studio 2005 is by holding ALT while you select text with the left mouse button.  This is the same as how you use block select mode in Notepad++ and probably other popular editors

  • Anonymous
    December 05, 2007
    Visual studio 2008 has now removed color syntax highlighting and intellisense for asp. This is enough for me to use a text editor. Microsoft's work around is to use Visual studio 2005 for asp, but why would you want to use Visual studio just for asp, it's a huge memory hog.

  • Anonymous
    December 13, 2007
    Classic ASP support would be crucial for me to consider using Visual Studio for an all purpose editor. I was moving in that direction until VS 2008 was released and offers no syntax highlighting and support for ASP. We have too many legacy apps to support.

  • Anonymous
    January 07, 2008
    I was so excited to get back into web development and in the back of my mind thought "I bet the tools are sooo much better than when I started in '97". they are.  But they only really support the new languages.  There are so many apps written in Classic ASP that I know I need to use a basic editor with highlighting of keywords and so forth to get the work done. PLEASE ...put the retro highlighting back in.  Also make the FTP work with a regular file structure faster.  Also...if it is an non-solution website.. don't make the Website menu dropdown hang for 30 min...before it figures that out. Also, if you want people to upgrade their code to .net...give them some tools to help suggest options and convert...then you won't have to have as much retro support going on....but text editing is here to stay for a while longer...put the highlighting back in....please. Back to ultraedit for me.  and just because MS is lacking in this vision...I might even use SharpDevelop for my .net code and recommend to all of he developers I work with in and out of the company...to check it out. I know MS wants all our apps in .NET and is trying  to make the pain of change less than the pain of staying he same.  But because our apps cannot be converted quickly or at all...UltraEdit and other tools will get our business and they will loose out on a good chunk of IDE sales.  That will make this market stronger!  And then I can say we are far better off than in the mid 90's.

  • Anonymous
    February 01, 2008
    I'll add a "Me Too" in with the other comments about Classic ASP support.  We adopt every new version of Visual Studio as it comes out, and we're now making the conversion of our projects to VS2008.  Unfortunately we still have to support a LOT of projects (50+) in production that were written long ago in Classic ASP, and it's just not cost effective to go through and upgrade the entire sites to .Net unless major changes are required for the application. So for the VS2008 roll out to not include at least syntax highlighting for Classic ASP code, what is Microsoft trying to say?  The massive adoption of Classic ASP is what helped give them the huge web developer base in the first place and now they just abandon support for it? I've tried some of the other non-Microsoft text editors out there, and they never stood up to VS2005 for editing ASP, HTML, CSS and XML. Additionally, we just went through an upgrade of three SQL Servers to MSSQL 2005, which of course means we are trying to switch from Legacy DTS's to the new SSIS packages, but VS2008 doesn't have support for SSIS projects? I was really pleased with the fact that there were not major code changes involved with an upgrade from VS2005 to VS2008, and I would LOVE to only have one version of Visual Studio on our machines!

  • Anonymous
    February 11, 2008
    The comment has been removed

  • Anonymous
    February 27, 2008
    Excellent post. You omitted TextPad from the list of other editors. :) TextPad has a "Compare Text Files" feature.  I love using WinMerge for comparisons but sometimes I just need a quick comparison of files for whatever reason. In regards to bookmarks, TextPad allows you to Cut Bookmarked lines and Copy Bookmarked lines.  An example where this is very helpful is when searching for entries within a log file.  I can do a find, (book)mark all, copy the bookmarked lines (copy other...) and open a new text document and paste those bookmarks I had just copied.  This is great when looking for specific entries in an IIS logfile and isolating them for analysis. Lastly, I do agree that some of the shortcuts are not intuitive.  CTRL+R not being replace?  /boggle

  • Anonymous
    June 10, 2008
    I have actually tried to use VS as the main editor. The main issue for me is what you call system integration, ie that I can not easily right-click a file and view the file in VS, but I have to drag-drop or other annoying things. Are there any tools available to add VS editing to the context menus?

  • Anonymous
    June 10, 2008
    Fred, You can create a shortcut to devenv.exe and put it in your Send To folder so that it appears anytime you right-click a file in Windows Explorer dialogs.  Folder "%UserProfile%SendTo"

  • Anonymous
    June 11, 2008
    Shame that I just found your blog posting.  I've been trying to do just that, use VS2008 as a general purpose text editor.  Load up is a snap, the UI is clean.  My two blocking issues:

  1. No reasonable way to simply do syntax highlighting.
  2. Writting an add-in for general purpose spell checking is just a pain
  • Anonymous
    June 23, 2008
    Wayne, Matt, John, Dave, Classic ASP syntax highlighting has been brought back in the Visual Studio 2008 Service Pack 1.  Please download the VS SP1 and try it out... http://search.live.com/results.aspx?q=visual+studio+2008+sp1

  • Anonymous
    June 27, 2008
    If only I could hide the menu bar, everything would be perfect!

  • Anonymous
    July 07, 2008
    I would rather use a smaller and faster program as an editor instead of VS 2008 IDE. I think is a matter of personal taste.

  • Anonymous
    July 13, 2008
    I agree that i'd need a faster, smaller app, rather than using VS as it is right now. I'd vote that you make the textbox that's embedded into Visual Studio available as a .net control so that we can write our own slimline text editors :-)

  • Anonymous
    October 23, 2008
    I don't get why MS SQL Server ONLY saves results files with .rpt extension, but I CAN'T get VS (2005) to open these as text because of Crystal Reports hogging this extension.

  • Anonymous
    October 23, 2008
    I also want to be able to open a new file without any syntax highlighting - just plain text - without having to go through 6 layers of options.

  • Anonymous
    November 28, 2008
    can someone help me with my VS, I want to move the dots and arrows in my text editor. have a look. http://www.bilinda.rw/articles.php?subaction=showfull&id=1225673353&archive=&start_from=&ucat=21&

  • Anonymous
    February 01, 2009
    The most annoying lack of functionality to me is the inability to add syntax highlighting support for additional languages. The projects I work on use a proprietary language from which C++ or C# is generated. It's most annoying to have to switch between VS2008 for C++ and C#, and a different editor (usually MultiEdit or TextPad) for the other language. I used to use MultiEdit for C++ and C# too, it's only because of Intellisense that I switched to editing them in VS.

  • Anonymous
    February 12, 2009
    Memory size. Just starting up a new instance of VS 2008 uses about 32 MB. Clicking Open File to open a 3 KB txt file caused memory usage to jump to 36 MB or so. Curious how your instance only used 10MB.

  • Anonymous
    March 06, 2009
    Jason, it may have to do with which VS product you have installed and if there are any additional 3rd party packages.  I believe my test was with VS Pro and no 3rd party packages.  Ideally a package would only initialize and consume memory when it is actually surfaced, but I've found many 3rd party packages will initialize at VS startup.

  • Anonymous
    April 17, 2009
    I use vim because:

  1. I already know vim.
  2. It is very customizable, I spend a lot of time customizing it.
  3. It starts instantly. VS takes some finite amount of time I find annoying. Yes, it is faster when opening a text file that when opening a solution with 50 project but still takes some time. I don't care about memory usage and all of that. That's why I have 4GB RAM, so that programs can take advantage of it. I am a cross platform developer. I do Windows, UNIX and Mac. On Windows, I mostly use Visual Studio for development. I find the workflow in VS totally different compared to a text editor. When developing software with VS, you need to have solutions and projects. Basically, I find VS more like a project management tool with integrated text editing and debugger.
  • Anonymous
    August 06, 2009
    I hope "popping up fast" is something that comes with VS2008 (which I'll be moving to soon). The main reason I avoid using Visual Studio is how slow it is. Loading a small text file: Visual Studio 2005 took 15 seconds, but Gvim took 4 seconds. (In my typical working environment.) Similarly, finding out how to do something in VS takes a long time. Opening help tends to be very slow, where in Gvim, I can type :help :substitute to learn how to use search and replace, and it even tab completes! I would love to see more tab completion in VS. (Visual Assist's Open in Solution dialog is great and the >of Command works pretty well too.) Switching between multiple documents in VS doesn't follow IE and Firefox's convention of Ctrl-Tab moves one tab to the right. And I don't get why tabs new tabs appear on the left and disappear off the right. If I'm editing 4 files and start stepping through code, then the files I was editing disappear from the tab bar. Of course there are other things like Vim's input method (although ViEmu makes VS work mostly like Vim) that make me way more productive than in VS:

  • incremental search (Ctrl-I feels clumsy but works) with search result highlighting (ViEmu, CodeKana, and VisualAssist plugins can all add highlighting)

  • easy regex search (works with incremental, and is on by default)

  • replace within a region (I use this very frequently in general text editing)

  • reload the current file from disk (for viewing log files)

  • and many commands executed with one or two keystrokes (find current word, go to matching brace, scroll so cursor is at top/centre/bottom of screen).

  • Anonymous
    April 13, 2010
    The comment has been removed

  • Anonymous
    June 27, 2010
    please can you add some example about notepad for our project..............please help me........i want to see more example in notepad,.

  • Anonymous
    May 09, 2011
    "UltraEdit has a ... column editing mode (used rarely, but handy)" So does VS!  Hold alt and highlight!  And it got better in 2010. "Double-clicking a tab in UltraEdit closes that file, nice." In VS, middle click the tab, closes the file. Another annoyance is that devenv is not on the path!  I work on many machines, and I have to add it to the path on each machine (which requires remembering (googling) where the darn thing is each time).

  • Anonymous
    December 25, 2014
    You are out of your mind...I mean really...