Notepad++ – Source Code Editor and More

 

Using Notepad++ with Visual Studio

To compliment Visual Studio, I use Notepad++ as my other source code editor. Visual Studio is still my primary IDE but its good to have Notepad++ on the side for that quick search in files, syntax highlighting depending on the language or even when you want to compare texts or codes. There are other free code editors out there like Notepad2 or Sublime but my vote goes to Notepad++.

My Favorite Notepad++ Features

Syntax Highlighting

Notepad++ Syntax Highlighting

You get to choose from the programming languages like C#, C++, SQL, XML to Objective-C or Perl for syntax highlighting.

Find In Files

When I’m working on a big solution file in Visual Studio and I want to look for all references of a specific method, property or keyword I use Notepad++ Find In Files. Instead of waiting for Visual Studio to return to me a list of instances, I just search it with Notepad++. It will take time and it will make Notepad++ unresponsive during search but I can still continue with my coding in Visual Studio.

Notepad++ FindInFiles

 

Plugins

There are number of plugins that are available for install and download. The plugins manager is also a plugin by itself. Just like Package Manager in Visual Studio its the source where third party features can be found.

Notepad++ PluginsManager

 

Useful Plugins

TextFx

Notepad++ TextFxUnwrapText

If you find yourself working on a big chunk of text and its supposed to stay on one line, you can use the “Unwrap Text” option of TextFx. It will remove the newline and carriage return characters of the text to make it a one line.

StraightText

XML Tools

If you are working with XML messages that is sent as a one line of string you can use the “Pretty Print with Line Breaks” option of XML tools. This will arrange the XML nodes with proper indention to make it easier for you to inspect the XML string you have.

Notepad++ XMLToolsPrettyPrint

XMLFormattedText

 

I hope this little note for Notepad++ helps.

LocalDb – SQL Express for Developers

 

When you install Visual Studio 2012 or higher the Sql Server Express component is also installed on your machine. When you add a connection to a database within VS I normally use .\SQLEXPRESS as the server name.

VSSqlExpressConnectoin

The .\SQLEXPRESS server name is totally fine and it will work. But I noticed that, like when you create a new ASP.Net MVC project, the default connection to the database is pointing to a LocalDb. I do not remember installing any LocalDb server.

New Asp.Net MVC Project

LocalDB Config

Nothing in my local machine services is running as LocalDb.

SQL Express Service

What is LocalDb vs Sql Server Express?

Based on this blog from MSDN SQL Server team, SQL Server Express is still a free version of the SQL Server. However, they decided to release LocalDb as a SQL Express edition for developers that will continue to be small, low footprint and easily configurable with no admin access required.

VSLocalDbConnection

One advantage I can see from using LocalDb is that you can still attach a file database using AttachDbFileName even if the connection is living within the same instance of the sqlservr.exe.

AttachDbFileName feature is a plus for developers who can request for a sample data in a file and use it to attach to the LocalDb just like you are connected to a full version of SQL Server.

As a personal note to myself, I should blog a lot more so expect more blog posts to come from me 🙂