The NO Visual Studio movement: Compiling .net projects in Notepad++
What is the NO Visual Studio Movement?
I don't talk about it much, but I'm the chief of an underground technical movement called the 'NO Visual Studio' movement, or NoVS to its friends.
NO in this case doesn't mean 'No.' We steal from the NoSQL movement and re-define NO to mean 'Not Only'.
In NoVS we respect that sometimes a set of lightweight tools can be more powerful (and certainly more enjoyable) than the 'one tool to rule them all' philosophy of VS. Sometimes low-power = high productivity.
The movement has its roots in this talk by Charles Petzold, 'Does Visual Studio Rot the Mind?' The final section, 'The Pure Pleasures of Pure Coding' is most relevant:
I decided to use plain old ANSI C, and to edit the source code in Notepad -- which has no IntelliSense and no sense of any other kind -- and to compile on the command line...
...there's no APIs, there's no classes, there's no properties, there's no forms, there's no controls, there's no event handlers, and there's definitely no Visual Studio.
It's just me and the code, and for awhile, I feel like a real programmer again.
He says everything right there in a nutshell. Every word is like strong whiskey.
In keeping with the NoVS movement, my favourite machine is a mini-laptop I use on the bus. It's a true 'No Visual Studio' machine where the only IDE is Notepad++.
I've tweaked my setup lately so that I can compile entire .net projects from inside notepad++ -- and I thought I'd share that bit with you now.
Compiling .net projects in Notepad++
Download this file and put it in your
Download tryCompile.txt (rename it as .bat)
Rename it to
tryCompile.bat... and always read batch files before running them on your own machine. (On a stranger's machine you can afford to be less cautious)
Once you've got that file in place, find notepad++'s shortcuts file. It should be here:
Edit that file. And under this tag
<UserDefinedCommands> add the following node:
<Command name="MSBuild" Ctrl="yes" Alt="no" Shift="yes"
Now, while editing any file that is part of an existing .net project, hit
Ctrl-Shift-B. That will launch 'TryCompile.bat' which will in turn locate and build the correct project file for you. (It will also add an
MSBuild option to the
Run menu in Notepad++)
This works for C# projects, VB.net projects, Data dude projects -- anything that includes a
proj file that MSBuild can consume.
If you have other tools, hacks or tweaks to further the cause don't hesitate to share them.
'Michael Silver' on Sat, 26 Feb 2011 05:01:57 GMT, sez:
If VS rots the brain, doesn't compiling from within Notepad++ do the same?
'Goran' on Sat, 26 Feb 2011 07:28:37 GMT, sez:
Eh, using syntax highlighting? Also fuv is the only editor for me!
'Doeke' on Sat, 26 Feb 2011 09:19:06 GMT, sez:
I always have a "c.cs" file stored in the root of the c-drive, so it's easy accesible. When I want to try something quick, I load this file in the editor (just load "c:\c.cs").
When editing done, just fire up the command line and type "csc c.cs && c" (ok, first you have to go to the root of the c-drive: "cd /d c:\").
'lb' on Sat, 26 Feb 2011 09:36:25 GMT, sez:
@Doeke -- that's a lot of c's.
'Pies' on Sat, 26 Feb 2011 10:38:50 GMT, sez:
Ah, the joys of having to manually compile before running :) I understand it's necessary in some types of software, but I don't want to have to do it ever again.
I think that whenever possible software should be compiled on the fly or interpreted. Perhaps there should be a special compilation mode that instead of the program binary creates a stub that checks and recompiles whatever's necessary when you run it?
'Brian' on Sat, 26 Feb 2011 10:56:22 GMT, sez:
Yer all wimps. I manipulate the 1's & 0's with a tiny magnet.
'Matt Casto' on Sat, 26 Feb 2011 11:37:25 GMT, sez:
Some other tools I like to use when not only working in VS include KaXaml, NimbleText (of course), LinqPad, WinMerge, Regulator.
'lb' on Sat, 26 Feb 2011 13:30:44 GMT, sez:
@matt -- i love linqPad and KaXaml too, and linked to them above from the words 'set' and 'of' in the third paragraph.
glad you understood that 'no' really does mean 'not only' as i do use VS on any computer powerful enough to run it adequately. (i.e. not my netbook)
'Mr. Moo' on Sat, 26 Feb 2011 15:14:43 GMT, sez:
Heh, I remember reading that article a few years ago and feeling justified. Now I read it and just feel crusty and old.
In a little bit of irony, I've done most of my perl programming in VS 2005! Obviously no text assist there - not even syntax highlighting (which Notepad++ will manage). I was just very comfortable with some features... bookmarks, find-in-files.
Also, please don't use my comments as toilet paper. (I did.)
'Don2' on Sun, 27 Feb 2011 10:53:51 GMT, sez:
But can I still use resharper?
'Jeremy D' on Tue, 01 Mar 2011 12:32:54 GMT, sez:
I'm still using Vim for C/C++ projects under windows, i should try this notepad++ one day. Btw, there's some cool plugins for vim to make it behave like an IDE :
- project http://www.vim.org/scripts/script.php?script_id=69
'Sensei Loco' on Tue, 01 Mar 2011 16:42:30 GMT, sez:
Personally, I like Programmer's Notepad:
'Petr Lev' on Thu, 01 Sep 2011 21:01:28 GMT, sez:
I tried to work in notepad++ with php, but this VS is much better!
'm' on Thu, 20 Oct 2011 16:05:45 GMT, sez:
I liked Jeff Atwood's thoughts on fizz bangs etc.
There's a lot of merit to being a swimmer, but sometimes your boss hands you a kickboard.
'mark' on Thu, 22 Dec 2011 04:57:13 GMT, sez:
i must be one of those new age programmers cause i love visual studio and it itellisense. partly because i get work done faster. i dont think the definition of real programmer mean you have to write everything in note pad++ or ANSI C to be a "real programmer". I believe as long as you can do what you stay you can without using a reference book or getting on google a thousand times then one would be called a programmer.
further more i do like to write my html in notepad++ but i always test it in VS simply because notepad++ will let you get away with things that VS wont and still yield the same results.
not to insult anyones skills but take your html and throw it in VS
'Jon' on Wed, 05 Sep 2012 14:00:03 GMT, sez:
All this machismo about "real programmers" is no different than the same tripe about "real men" or "real women". Use the tool that lets you work most quickly and efficiently. If that's notepad++/Vim/manunal builds for you and you find you can develop faster than your colleague on VS, then by all means, have at it. I find, for large codebases with many projects and tons of source files, etc, that it's a heck of a lot easier and much much faster, to create a VS environment and troubleshoot or just navigate code within. I know there are alternatives to VS that do the same (use them if you like); I'm simply used to VS and its rich suite of tools (the integrated debugger is mighty hard to beat).
't' on Fri, 28 Sep 2012 11:45:26 GMT, sez:
agree with you, but i find it hard to learn .net and VS at the same time