1

Re: Learning VIM need a little help

I am working on learning VIM.  From reading the information on it other people I know that use it I have decided to get this under my belt.

The biggest issue I'm having right now is in SSMS.  I will have many differnet queries in the file that are pretty small for checking data and testing things.  I'm used to just selecting the line and doing an F5 to execute just that query.  Is there a quick way using VIM keystrokes to do the same thing?  I try doing the following "^v$" then press F5 but that doesn't seem to work.  It still uses the whole page and not just the selection.  Is there a way to tie the VIM selection to the standard selection mode?  Am I missing something here?

(ATM, working with VIM is like working in a straightjacket lol)

2

Re: Learning VIM need a little help

Hello Mark,

Here is a forum thread where it's shown both how to turn ViEmu's selection into the VS selection (gS, which is only meant to be used inside macros), and how to create a mapping that does what you want, that is, execute the current SQL statement.

To avoid the need of gS, you can also go to Tools|ViEmu Settings and check "Use standard selection for ViEmu visual mode", which will make ViEmu use standard selection when you use vim v, or V or Ctrl-V. I don't recommend this because the emulation of vim's visual mode isn't so faithful, as the standard selection is more limited: it can't show the cursor anywhere in the selection, etc...

We'll be glad to read about your progresses here!

Regards,

  -- Jon

3

Re: Learning VIM need a little help

gS does exactly what I'm looking for.

Now to remember it as I continue on this VIM road.  Thanks for the reply.

4

Re: Learning VIM need a little help

Mark, great that it helps. I'm hoping the VS 2010 version will be able to integrate better and not require work-arounds like gS. I certainly think ViEmu will be much greater in VS 2010, as the new editor is much more flexible! I have already started work in the new version, and hope to have a beta ready soon. I'm excited with the opportunities of ViEmu and Codekana in the new environment!

  -- Jon

5

Re: Learning VIM need a little help

If it helps my company already has VS2010 in the office and I can potentially try things out for you.  I'm not currently doing developement in 2010 but could setup a test environment if you wanted me to run some scenarios for ya.

6

Re: Learning VIM need a little help

Thanks Mark, it's very kind of you. I've taken note of your email and will get back in touch with you as soon as there is a beta ready!

Regards,

  -- Jon