Monday, July 30, 2012

Reset SQL Server 2008 SSMS Shortcuts

Recently I've been playing with gVim trying to get into the lightning fast editing that is said to come with using vi as an editor. Problem is, unless I'm mistaken (I'd be happy to be proven wrong here) it's difficult or impossible to add the common tasks I use with SSMS. F5 to execute, remove results pane, new/next window etc.

An addon I was trying out called ViEmu added a lot of great vi functionality to SSMS. It's something that I think users adept at using vi would love. Maybe even an SSMS user could learn to love. But I'm new, and like anyone starting out using vi, it's frustrating, so in lieu of the hundreds of projects looming which need to get done, I guess learning vi will have to wait.

What does this have to do with my posting? This addon (as do many other SSMS addons) remaps many commonly used shortcut. Ctrl-r to hide results pane, alt-w to access window switching, even ctrl-n for new query window. Begin google search for resetting keyboard shortcuts in SSMS.

Turns out for whatever reason, SSMS really doesn't like you being able to easily change your shortcut settings, and a surprising dearth of information was available on the interwebs on this topic. I got it to work, so let me distill what I can for you.

  1. SSMS doesn't store keyboard shortcut information in the registry but rather in local files so uninstallation won't necessarily help.
  2. the files are user specific so they are stored in AppData as opposed to somewhere in the install directory.
  3. SSMS stores keyboard shortcut data in .vsk files (two of which seem to be responsible for the settings concerning SSMS


You have to go to your app data directory. Depending on your version and how your machine(s) is/are setup, your path may look something like this:

C:\Documents and Settings\ShayShay\Application Data\Microsoft\Microsoft SQL Server\100\Tools\Shell

in there, you're looking for two .vsk files - User.vsk and/or Current.vsk. I found them both in the directory mentioned above, but it sounds as though they may be in slightly different paths in the SSMS app data dir.

Point is, close SSMM, delete those two files (or as i did, cut and paste them to my desktop to be safe) then start up SSMS. Try something simple like select 1 + f5 = ctrl-r (toggle results pane) or really whichever your previously existing shortcut was. If it's still borked, time to go hunting through your app data dirs for other offending .vsk

NOTE: I'm not sure what the result of deleting .vsk files at will are. So far, SSMS looks like it auto-remakes the necessary files wiht default settings (what I wanted) but always be careful snipping out random files. I'd really recommend cutting and pasting them to desktop or something so that if things go horribly wrong, you dont end up in a worse situation than you started in.

Monday, July 23, 2012

Despite the fact that reality is really just a construct of the mind – filtered sensory input through a veil of individual experience, at least on a personal scale – most sane people have a good grip on what’s real to them. It’s really cool to think about what reality means to each of us. The same painting, song, phrase can have a profoundly different impact from person to person. When you think about the fact that we can play out what-if scenarios, imagine being in outer space, fantasize about island vacations or what might happen if we run this red light, reality is really just a single path, a single slit through which we choose to observe our reality flow through. In reality, the membrane separating what could be, what is, and what is not is razor thin. It may not, and in all likelihood, doesn’t exist, at least not in the sense that a traditional boundary might exist, but whatever interplay of neurons allows for the distinction, let us refer to it as a membrane. Somewhere however, we draw the line between fact and fiction and navigate the universe in a way which is coherent and stable. What happens when that membrane fails? When the stories created by sensory inputs are given equal credence to the next? When the conscious mind is unable to distinguish between the “right” and “wrong” paths? Right, in this sense means the version of reality which most closely lays on top of the functionality of the objective world. Certainly, there is no true “right” path, but as goes one of my favorite quotes, “it’s a little wrong to say a Tomato is a vegetable. It’s very wrong to say it's a suspension bridge”.

Somehow out of the massive amount of information which flows through our senses in a given period of time, we have to come up with a coherent view of reality. Additionally, we string individual moments together to tell an ongoing story, one which is guided by the preceding moments as well as the current. Take for example the idea of the butterfly effect. Assuming the collapse of the membrane between fact and fiction is instantaneous, the individual would instantly have to choose between what seem to be a very large set of congruent versions of reality. Once chosen, from moment to moment new realities will have to be chosen. In my entirely subjective opinion, if a coherent thread cannot be found, consciousness ceases to occur. Sensory inputs “short out” or fizzle to nothing as does the majority of the input which we don’t actively process. However within the noise, if the mind can catch on to a theme connecting realities, that story will begin to play out, however convoluted it’s path until the membrane can be reestablished and align thought with the past of most congruence.

If you’ve ever listened to someone paranoid about, say Big Brother spying on them, or perhaps listened to yourself as you hear the floorboards creak, the stories, objectively are pretty ridiculous. A car has been parked outside for a week. At the same time, your neighbor hasn’t been seen at home in roughly the same time. And who was on the other end of that hang-up call this morning? The stories contain a thread of continuity at least, and sometimes while floating through the realm of possible interpretations of reality, a thread of continuity is the only reference point we have to an underlying reality.

Like trying to follow a straight line on the ground in a strobe light, for the most part it’s doable. The faster the strobe or the longer the periods of illumination, the easier it is to trace the line of reality. Even in slower strobes, you can correct your course quickly enough so that the path is always within grasp. The longer the darkness however, the easier it is to stray away from the line without even knowing it. After a time your brain thinks you’re moving straight when in fact you’re far from the center. What happens if the light never turns back on? How do you know whether you’re actually on the line or whether your brain just wants to believe that it is?