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

window split size of a visual selection

Expand Messages
  • Alexandre Provencio
    Hello guys! Can vim (or a plugin) provide me a way of creating a window split with the contents and size of a current visual selection? - Alexandre -- -- You
    Message 1 of 6 , Aug 13, 2014
    • 0 Attachment
      Hello guys!

      Can vim (or a plugin) provide me a way of creating a window split with the
      contents and size of a current visual selection?

      - Alexandre

      --
      --
      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/d/optout.
    • Ethan Hereth
      On Wed, Aug 13, 2014 at 4:24 PM, Alexandre Provencio ... Good day Alexandre, Have a look at https://github.com/chrisbra/NrrwRgn This is a really nice plugin
      Message 2 of 6 , Aug 13, 2014
      • 0 Attachment
        On Wed, Aug 13, 2014 at 4:24 PM, Alexandre Provencio
        <alexandreprovencio@...> wrote:
        > Hello guys!
        >
        > Can vim (or a plugin) provide me a way of creating a window split with the
        > contents and size of a current visual selection?
        >
        > - Alexandre

        Good day Alexandre,

        Have a look at https://github.com/chrisbra/NrrwRgn

        This is a really nice plugin that does what you are looking for. Also
        notice that this page also list a few other similar plugins in the
        case NrrwRgn does not do quite what you want it to.

        Ethan Alan
        >
        > --
        > --
        > 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/d/optout.

        --
        --
        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/d/optout.
      • Alexandre Provencio
        That s awesome, thank you Ethan! On Wed, Aug 13, 2014 at 5:29 PM, Ethan Hereth ... -- -- You received this message from the vim_use maillist. Do not
        Message 3 of 6 , Aug 14, 2014
        • 0 Attachment
          That's awesome, thank you Ethan!

          On Wed, Aug 13, 2014 at 5:29 PM, Ethan Hereth
          <advocateddrummer@...> wrote:
          > On Wed, Aug 13, 2014 at 4:24 PM, Alexandre Provencio
          > <alexandreprovencio@...> wrote:
          >> Hello guys!
          >>
          >> Can vim (or a plugin) provide me a way of creating a window split with the
          >> contents and size of a current visual selection?
          >>
          >> - Alexandre
          >
          > Good day Alexandre,
          >
          > Have a look at https://github.com/chrisbra/NrrwRgn
          >
          > This is a really nice plugin that does what you are looking for. Also
          > notice that this page also list a few other similar plugins in the
          > case NrrwRgn does not do quite what you want it to.
          >
          > Ethan Alan
          >>
          >> --
          >> --
          >> 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/d/optout.
          >
          > --
          > --
          > 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/d/optout.

          --
          --
          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/d/optout.
        • Alexandre Provencio
          Ethan, after testing this great plugin I unfortunately found out it still not exactly what I m looking for. While NrrwRgn focuses on the selected area, what
          Message 4 of 6 , Aug 14, 2014
          • 0 Attachment
            Ethan, after testing this great plugin I unfortunately found out it
            still not exactly what I'm looking for.

            While NrrwRgn "focuses" on the selected area, what I really would need
            is the case when I create a viewport of a selected area but work on the
            *other* viewport, and it would be very helpful if I could create this
            viewport exactly the size of a selection so I don't have to loose time
            resizing it.

            Regards,
            - Alexandre

            On Thu, Aug 14, 2014 at 8:35 PM, Alexandre Provencio
            <alexandreprovencio@...> wrote:
            > That's awesome, thank you Ethan!
            >
            > On Wed, Aug 13, 2014 at 5:29 PM, Ethan Hereth
            > <advocateddrummer@...> wrote:
            >> On Wed, Aug 13, 2014 at 4:24 PM, Alexandre Provencio
            >> <alexandreprovencio@...> wrote:
            >>> Hello guys!
            >>>
            >>> Can vim (or a plugin) provide me a way of creating a window split with the
            >>> contents and size of a current visual selection?
            >>>
            >>> - Alexandre
            >>
            >> Good day Alexandre,
            >>
            >> Have a look at https://github.com/chrisbra/NrrwRgn
            >>
            >> This is a really nice plugin that does what you are looking for. Also
            >> notice that this page also list a few other similar plugins in the
            >> case NrrwRgn does not do quite what you want it to.
            >>
            >> Ethan Alan
            >>>
            >>> --
            >>> --
            >>> 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/d/optout.
            >>
            >> --
            >> --
            >> 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/d/optout.

            --
            --
            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/d/optout.
          • Christian Brabandt
            Hi Alexandre! (Please don t top poste) ... That s whats hooks are for (:h NrrwRgn-hook) You probably want something along ... You probably also want ... to be
            Message 5 of 6 , Aug 15, 2014
            • 0 Attachment
              Hi Alexandre!

              (Please don't top poste)

              On Do, 14 Aug 2014, Alexandre Provencio wrote:

              > Ethan, after testing this great plugin I unfortunately found out it
              > still not exactly what I'm looking for.
              >
              > While NrrwRgn "focuses" on the selected area, what I really would need
              > is the case when I create a viewport of a selected area but work on the
              > *other* viewport, and it would be very helpful if I could create this
              > viewport exactly the size of a selection so I don't have to loose time
              > resizing it.

              That's whats hooks are for (:h NrrwRgn-hook)

              You probably want something along
              :let b:nrrw_aucmd_create='exe "resize".line("$")|wincmd p'

              You probably also want
              :let g:nrw_rgn_protect='n'
              to be able to modify the original buffer.

              Also please note, you need to make sure, that if you modify the
              highlighted regions, do NOT write the narrowed buffer or else it will
              overwrite your changes.

              Mit freundlichen Grüßen
              Christian
              --

              --
              --
              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/d/optout.
            • Alexandre Provencio
              ... Christian, although I could not manage to auto resize the way you suggested, I think I may not need it anymore. After realizing I could open nested
              Message 6 of 6 , Aug 16, 2014
              • 0 Attachment
                On Fri, Aug 15, 2014 at 4:29 AM, Christian Brabandt <cblists@...> wrote:
                > Hi Alexandre!
                >
                > (Please don't top poste)
                >
                > On Do, 14 Aug 2014, Alexandre Provencio wrote:
                >
                >> Ethan, after testing this great plugin I unfortunately found out it
                >> still not exactly what I'm looking for.
                >>
                >> While NrrwRgn "focuses" on the selected area, what I really would need
                >> is the case when I create a viewport of a selected area but work on the
                >> *other* viewport, and it would be very helpful if I could create this
                >> viewport exactly the size of a selection so I don't have to loose time
                >> resizing it.
                >
                > That's whats hooks are for (:h NrrwRgn-hook)
                >
                > You probably want something along
                > :let b:nrrw_aucmd_create='exe "resize".line("$")|wincmd p'
                >
                > You probably also want
                > :let g:nrw_rgn_protect='n'
                > to be able to modify the original buffer.
                >
                > Also please note, you need to make sure, that if you modify the
                > highlighted regions, do NOT write the narrowed buffer or else it will
                > overwrite your changes.
                >
                > Mit freundlichen Grüßen
                > Christian

                Christian, although I could not manage to auto resize the way you
                suggested, I think I may not need it anymore. After realizing I could
                open nested narrowed regions, I feel that the way the plugin deals with
                it is smart enough for my workflow.

                Thanks for your help and this very useful plugin.

                Cheers.

                - Alexandre

                > --
                >
                > --
                > --
                > 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/d/optout.

                --
                --
                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/d/optout.
              Your message has been successfully submitted and would be delivered to recipients shortly.