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

open new file in buffer

Expand Messages
  • rudrab
    Hi, generally, when I need to open multiple text file, I run it from terminal, generally open them under same window of gvim (many buffer under same window or
    Message 1 of 4 , Oct 11, 2013
    • 0 Attachment
      Hi,
      generally, when I need to open multiple text file, I run it from terminal, generally open them under same window of gvim (many buffer under same window or tabbed window, whatever).
      But, sometime I do need to open files via GUI, i.e. by mouse click, which always open in a new window. Is there any way to set mouse-click to open new text file to a buffer if a vim window is already open?

      --
      --
      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.
    • Ben Fritz
      ... Yes, by setting up filetype associations which use Vim s --remote series of commands. See :help --remote and following.
      Message 2 of 4 , Oct 11, 2013
      • 0 Attachment
        On Friday, October 11, 2013 9:03:50 PM UTC-5, rudrab wrote:
        > Hi,
        > generally, when I need to open multiple text file, I run it from terminal, generally open them under same window of gvim (many buffer under same window or tabbed window, whatever).
        > But, sometime I do need to open files via GUI, i.e. by mouse click, which always open in a new window. Is there any way to set mouse-click to open new text file to a buffer if a vim window is already open?

        Yes, by setting up filetype associations which use Vim's --remote series of commands. See :help --remote and following.

        http://vim.wikia.com/wiki/Launch_files_in_new_tabs_under_Windows has it set up for multiple tabs within one Vim instance. It is easily adaptable for multiple buffers in a single window instead.

        The wiki article relies on --remote-tab-silent to launch files. If you don't want tabs, just use --remote-silent.

        --
        --
        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.
      • Ben Fritz
        ... Oh, and also http://vim.wikia.com/wiki/Launch_files_in_new_tabs_under_Unix if you re not on Windows. The key is still using --remote with whatever your
        Message 3 of 4 , Oct 11, 2013
        • 0 Attachment
          On Friday, October 11, 2013 10:21:16 PM UTC-5, Ben Fritz wrote:
          > On Friday, October 11, 2013 9:03:50 PM UTC-5, rudrab wrote:
          > > Hi,
          > > generally, when I need to open multiple text file, I run it from terminal, generally open them under same window of gvim (many buffer under same window or tabbed window, whatever).
          > > But, sometime I do need to open files via GUI, i.e. by mouse click, which always open in a new window. Is there any way to set mouse-click to open new text file to a buffer if a vim window is already open?
          >
          > Yes, by setting up filetype associations which use Vim's --remote series of commands. See :help --remote and following.
          >
          > http://vim.wikia.com/wiki/Launch_files_in_new_tabs_under_Windows has it set up for multiple tabs within one Vim instance. It is easily adaptable for multiple buffers in a single window instead.
          >
          > The wiki article relies on --remote-tab-silent to launch files. If you don't want tabs, just use --remote-silent.

          Oh, and also http://vim.wikia.com/wiki/Launch_files_in_new_tabs_under_Unix if you're not on Windows.

          The key is still using --remote with whatever your system uses for file associations/default editor.

          --
          --
          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.
        • lessthanideal
          ... Further down that page it also links to a (Windows only) plugin that does similar things to open files in tabs, splits or vertical splits.
          Message 4 of 4 , Oct 14, 2013
          • 0 Attachment
            On Saturday, 12 October 2013 04:21:16 UTC+1, Ben Fritz wrote:
            > On Friday, October 11, 2013 9:03:50 PM UTC-5, rudrab wrote:
            > > Hi,
            > > generally, when I need to open multiple text file, I run it from terminal, generally open them under same window of gvim (many buffer under same window or tabbed window, whatever).
            > > But, sometime I do need to open files via GUI, i.e. by mouse click, which always open in a new window. Is there any way to set mouse-click to open new text file to a buffer if a vim window is already open?
            >
            > Yes, by setting up filetype associations which use Vim's --remote series of commands. See :help --remote and following.
            >
            > http://vim.wikia.com/wiki/Launch_files_in_new_tabs_under_Windows has it set up for multiple tabs within one Vim instance. It is easily adaptable for multiple buffers in a single window instead.
            >
            > The wiki article relies on --remote-tab-silent to launch files. If you don't want tabs, just use --remote-silent.

            Further down that page it also links to a (Windows only) plugin that does similar things to open files in tabs, splits or vertical splits.

            http://www.vim.org/scripts/script.php?script_id=4214

            regards,
            Geoff

            regards,
            Geoff

            --
            --
            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.