Category Archives: 8330

A good book on Vim commands and a Vim emulator for VS

I’ve used Vim for quite some time on Windows (yep, not quite a Vim purist…) however, I have never actually read a book on Vim. For those who don’t know Vim is an awesome text editor with a really powerful set of commands you can issue via the keyboard.

Why care? Well, using Vim commands when editing any sort of document really allows you to do stuff really quick once you have a pretty decent understanding of how to use the commands. Traversing text files and such like becomes a lot less mundane, performing edit based transformations becomes quick and effective, etc etc.

The book I am talking about is called Learning the Vi and Vim Editors, 7th Edition. It came to my attention while browsing Safari as this edition is only a few months old. I’m about 5 chapters in and I must say that its very well written and straight to the point. If you are in the market for such a book then I would happily recommend this one.

Also…

Until around 6 or so weeks ago I didn’t know Vim like functionality could be emulated within any of the major applications I use (namely VS) but to my surprise there was – ViEmu. Now you can use all those Vim commands within VS. The same people also provide an emulator for Office based products – Word, and Outlook (I think those are just the two) as well as SQL Management Studio.

Our cries have finally been answered then?

I for one am very happy that the next version of Visual Studio will finally embrace what some of us have been requesting for a long time now – UML adoption. A few months ago I mentioned some stuff that would be in the next version of VS and now that more has been going on I am thoroughly pleased.

For my part I’ve not really looked too much into what’s going on with the class diagrams etc and whether or not we will be graced with the standard l&f for UML diagrams. I for one hope that this does happen.

This is way overdue and both Eclipse and Netbeans have UML incorporated into them to a certain degree. Netbeans has pretty good UML support right now in fact. Of course the great thing about the addition of these UML features is that we will be able to get a more abstract view of our code and the way various components work with one another by reverse engineering it. Maybe this might not seem so helpful now, but when you revisit old code or encounter code that isn’t yours it will be.

I know that the VS team have had a tonne of stuff to do but why have we had to wait so long for tools which are pretty much essential? We’ve been palmed off to use things like Visio or fork out the big bucks for more comprehensive software.

Well, at least the wheels are finally in motion. Hip hip 😉

Before I go be sure to check out Channel9 this week for more insight on what’s coming up in VS2010. I briefly watched a video today just to get the gist of what has been added since I last looked and it was pretty decent.

Results: Using a dark theme in VS for a week

As I mentioned several days ago I’ve been seeing if a dark theme in VS would help my eyes a little. The short of it is – no, no it didn’t. The major sore point is that if you use a dark theme in VS then you find yourself constantly swapping between dark (VS) and light (web content, content in general). The latter of course doesn’t sound like its particularly good for you and I’d definitely concur with that.

I actually found that my background was slightly off-white in my VS settings and since changing it to pure white around 3 or so days ago I’ve found that my eye strain has just disappeared. Funny thing is I can never remember changing the background colour.

I’ve no doubt that the colour schemes used in VS are very subjective so I won’t announce that light themes are the best, but it seems to work well for me.

Experiment: Using a dark theme in VS for a week

I’ve been highly critical of using dark themes in Visual Studio particularly because the UI of VS is light in its very nature. The combination of the two proving to be an interesting proposition when using VS for large durations of time.

I digress. Recently I have suffered a few eye issues and I’m pretty much willing to try and use a dark theme now for more than an hour and then dismissing it in the hope that it may help me out a little. I have tried a few other minor solutions prior to this experiment, the most of which revolve around making the background colour of VS a slightly off-white colour. If anything that approach made things worse.

I’ll be using the theme for all my coding which spans from C++ to C# and see how it goes. The theme I will use is Vibrant Ink by Rob Conery.

Hopefully this may help my eyes a little? …

Visual Studio 2008 SP1 released

Download.

Some stuff it includes:

  • Some new WPF designer stuff (not sure what though – not really my area)
  • ADO.NET Entity Designer
  • Office MFC stuff (not sure if it also includes TR1, these two were bundled together earlier on in the year)
  • Some improvements for the JavaScript support
  • Background compilation for C#

Also you will need SP1 to use VS2008 with SQL Server 2008 which was released a few days ago.

My Visual Studio vNext wish list

My wish list for Visual Studio vNext isn’t that long. The things I would like to see in Visual Studio vNext (I’m not that hopeful) are the following:

  • A filtering intellisense members list box
  • Some intelligent suggestions
  • More refactoring options

Unfortunately I am going to do the unmentionable and compare VS to Eclipse.

A filtering intellisense members list box

As the number of classes in the BCL grows, and with newer technologies arriving all the time I don’t think there has ever been a better time to implement this feature. Eclipse does a good job of it and is incredibly handy:

eclipse_make_that_list_smaller_1

eclipse_make_that_list_smaller_2

There are some products out there that you can actually install to do this, they include:

Some intelligent suggestions

This is a lame example, but its a pretty common one. Today in VS suggestions for the most part are non-existent. I know that in VS 2008 SP1 background compilation for C# is here (warnings, errors) but it still doesn’t give you what Eclipse does with respect to suggestions.

eclipse_unused_imports

I know that there are probably a tonne of people reading this now shouting “You can remove unused using directives now!” True, but its never emphasised to you by the IDE. Again I find myself uttering the word Resharper for this stuff, but should we really have to buy into a 3rd party product for something like this? We could also extend this to something like variables that are never referenced.

eclipse_unused_vars

More refactoring options

Eclipse offers an absolute tonne of refactoring options which are integrated really great into the IDE.

eclipse_refactor_menu

While I don’t have any major gripes about what is offered in VS 2008 with respect to refactoring, I do think it lacks somewhat. Some of the refactoring options in VS could do with a more streamlined approach as well. A great example of this is the rename option. Invoking rename will open a big goofy dialogue box which would be appropriate if you were renaming a field or something – in place renaming would be much more appropriate for local renaming’s though.

eclipse_in_place_renaming

Final thoughts

I really like VS and all that it gives you but I can’t help feel that we are losing out on some of this stuff. I’m sure that the VS team are incredibly busy building new designers, but if anyone on the VS team happen’s to stumble across this post then please give these features consideration.

Purposely I have not mentioned C++, they have enough trouble getting intellisense working as it is. If you are interested in this though then check out Intellisense History, Part 1 and Intellisense, Part 2 (The Future). Both blog posts are from the VC++ blog. Visual Assist X is a nice tool though if you want a more rounded experience in VC++ land right now.