Loading ...
Sorry, an error occurred while loading the content.

Re: vim not finding the end of the sql statement

Expand Messages
  • David Fishburn
    ... I will look into it in a couple of days. As a work around and a more reliable option, I would use linewise visual mode (capital V) and visually select what
    Message 1 of 4 , May 29, 2013
    • 0 Attachment



      On Wed, May 29, 2013 at 5:36 PM, whytheq <whytheq@...> wrote:
      In `gvim` if I put the cursor (normal mode) in the word SELECT and then hit `\se` then it runs ok:

          SELECT GETDATE();

      If I do exactly the same but for a query over two lines then it errors.

          SELECT
          GETDATE();

      I have the lastest version of dbext installed.


      Another user (Jason) just reported this to me as well.

      I will look into it in a couple of days.

      As a work around and a more reliable option, I would use linewise visual mode (capital V) and visually select what you want executed and hit \se to execute that selection.

      So when your cursor is on the line SELECT, use this combination:
      V/;<cr>\se

      Where <cr> is when you hit enter on the keyboard.


      BTW, why post these questions on stackoverflow?  This is the Vim list and this is generally where all the plugin authors monitor.

      David 

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
       
      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
       
       
    • Marc Weber
      As alternative you may want to give http://github.com/MarcWeber/vim-addon-sql a try. Its minimalistic, simple. You either select sql statements visually, or it
      Message 2 of 4 , May 29, 2013
      • 0 Attachment
        As alternative you may want to give http://github.com/MarcWeber/vim-addon-sql a
        try. Its minimalistic, simple. You either select sql statements
        visually, or it will try to find the start/end automatically based on
        empty lines or ;.

        Marc Weber

        --
        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • whytheq
        Hi David I m new to vim and open source software so still feeling around about where to post questions and find answers - Stack Overflow has been a real
        Message 3 of 4 , May 30, 2013
        • 0 Attachment
          Hi David

          I'm new to vim and open source software so still feeling around about where to post questions and find answers - Stack Overflow has been a real revelation for me over the past 18 mths so I sort of live my coding life through that portal but I will switch my vim questions to this group.

          I'll use one of the visual modes for the time-being.

          WhyTheQ (Jason)


          On Thursday, May 30, 2013 2:49:09 AM UTC+1, David Fishburn wrote:
          > On Wed, May 29, 2013 at 5:36 PM, whytheq <why...@...> wrote:
          >
          > In `gvim` if I put the cursor (normal mode) in the word SELECT and then hit `\se` then it runs ok:
          >
          >
          >
          >     SELECT GETDATE();
          >
          >
          >
          > If I do exactly the same but for a query over two lines then it errors.
          >
          >
          >
          >     SELECT
          >
          >     GETDATE();
          >
          >
          >
          > I have the lastest version of dbext installed.
          >
          >
          >
          >
          > Another user (Jason) just reported this to me as well.
          >
          >
          > I will look into it in a couple of days.
          >
          >
          > As a work around and a more reliable option, I would use linewise visual mode (capital V) and visually select what you want executed and hit \se to execute that selection.
          >
          >
          >
          > So when your cursor is on the line SELECT, use this combination:
          > V/;<cr>\se
          >
          >
          > Where <cr> is when you hit enter on the keyboard.
          >
          >
          >
          >
          >
          > BTW, why post these questions on stackoverflow?  This is the Vim list and this is generally where all the plugin authors monitor.
          >
          >
          > David

          --
          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        Your message has been successfully submitted and would be delivered to recipients shortly.