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

Re: MacVIM help?

Expand Messages
  • Tim Gray
    ... That combination works here for me for files clicked in Finder. For files opened from the command line, to open them up in a MacVim window that is already
    Message 1 of 9 , Jun 14, 2012
    • 0 Attachment
      On Jun 14, 2012 at 08:05 AM -0700, Jason Slack-Moehrle wrote:
      >In MacVim prefs I have checked: Open files from applications: in the
      >current window
      >as well as the pop-up below as: with a tab for each file.

      That combination works here for me for files clicked in Finder.

      For files opened from the command line, to open them up in a MacVim
      window that is already open, you'll probably need to use the --remote
      option. Also, perusing the command line options, it looks like the -p
      option will open the files in tabs. From my playing around with these
      options right now, --remote and -p don't work together. I had to use
      --remote-tab to get the combination behavior (open in the current MacVim
      instance, but in tabs).

      --
      You received this message from the "vim_mac" 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
    • björn
      ... This is not a valid command. What did you intend to do? ... This is also a bit strange. Usually mvim refers to the script that comes bundled with
      Message 2 of 9 , Jun 14, 2012
      • 0 Attachment
        On Thu, Jun 14, 2012 at 5:05 PM, Jason Slack-Moehrle wrote:
        >
        > I have in my .vimrc:
        >
        > tabs=true

        This is not a valid command. What did you intend to do?

        > and in my .bash_profile:
        >
        > alias mvim="open -a "/Applications/MacVim-snapshot-64/MacVim.app""

        This is also a bit strange. Usually "mvim" refers to the script that
        comes bundled with MacVim (see ":h mvim").

        > In MacVim prefs I have checked: Open files from applications: in the
        > current window
        > as well as the pop-up below as: with a tab for each file.
        >
        > I am still getting separate windows.

        I can just say the same as Tim: this preference works fine for me.
        Maybe you should try going through the troubleshooting guide:

        https://github.com/b4winckler/macvim/wiki/Troubleshooting

        Björn

        --
        You received this message from the "vim_mac" 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
      • Bee
        On Jun 14, 8:05 am, Jason Slack-Moehrle ... This works well to open files from the command line: alias mvim= open -a macvim $@ To
        Message 3 of 9 , Jun 14, 2012
        • 0 Attachment
          On Jun 14, 8:05 am, Jason Slack-Moehrle <slackmoeh...@...>
          wrote:
          > I am trying to create a macVim environment that allows files when
          > double clicked from the Finder and opened via a command-line to be
          > opened in MacVim in tabs.
          >
          > I have in my .vimrc:
          >
          > tabs=true
          >
          > and in my .bash_profile:
          >
          > alias mvim="open -a "/Applications/MacVim-snapshot-64/MacVim.app""
          >
          > In MacVim prefs I have checked: Open files from applications: in the
          > current window
          > as well as the pop-up below as: with a tab for each file.
          >
          > I am still getting separate windows.
          >
          > Can anyone provide advice?
          >
          > -Jason

          This works well to open files from the command line:

          alias mvim='open -a macvim "$@"'

          To have Finder open files with double click:
          - find a file of the type (extension) you want to open in Finder
          - in Finder highlight the file
          - use "Finder > File > Get Info" --or-- command+I
          - click the triangle next to "Open With"
          - select MacVim, you may need to navigate using "Other..."
          - finally select "Change All"

          Then all files with that same extension will open with MacVim

          -Bill

          --
          You received this message from the "vim_mac" 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
        • Bee
          Oh... it can be simpler: alias mvim= open -a macvim $@ And it can be used to open several files at time: mvim zzoom.css ccc.sh .v7z.sh -Bill -- You received
          Message 4 of 9 , Jun 14, 2012
          • 0 Attachment
            Oh... it can be simpler:

            alias mvim="open -a macvim $@"

            And it can be used to open several files at time:

            mvim zzoom.css ccc.sh .v7z.sh

            -Bill

            --
            You received this message from the "vim_mac" 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
          • Bee
            Another possibility... to open each file in a tab: macvimpath= /Applications/MacVim-snapshot-64 alias vimm= $macvimpath/MacVim.app/Contents/MacOS/Vim -gp $@
            Message 5 of 9 , Jun 14, 2012
            • 0 Attachment
              Another possibility... to open each file in a tab:

              macvimpath="/Applications/MacVim-snapshot-64"

              alias vimm="$macvimpath/MacVim.app/Contents/MacOS/Vim -gp $@"

              I like to separate the path from the app to make it clear where the
              app is,
              just in case, later, I move or rename it.

              These are in my ~/.profile file.

              Bill

              --
              You received this message from the "vim_mac" 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
            • zabouti
              Thanks to everyone here - this is something I ve wanted to do for a long time. Now, thanks to the suggestions here and to vim s help messages, I ve made a
              Message 6 of 9 , Jun 15, 2012
              • 0 Attachment
                Thanks to everyone here - this is something I've wanted to do for a long time.

                Now, thanks to the suggestions here and to vim's help messages, I've made a little shell script with these two lines:

                #!/bin/sh
                /Applications/MacVim.app/Contents/MacOS/Vim -gp --remote-tab $*

                If I call it with something like 'myvim ~/temp.txt', it will open ~/temp.txt in an existing MacVim window in a new tab.

                I love it!

                --
                You received this message from the "vim_mac" 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
              • Andy Todd
                ... Or you could just switch to MacVim and type :tabe ~/temp.txt Regards, Andy -- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ -- You
                Message 7 of 9 , Jun 16, 2012
                • 0 Attachment
                  On 16/06/12 2:25 AM, zabouti wrote:
                  > Thanks to everyone here - this is something I've wanted to do for a long time.
                  >
                  > Now, thanks to the suggestions here and to vim's help messages, I've made a little shell script with these two lines:
                  >
                  > #!/bin/sh
                  > /Applications/MacVim.app/Contents/MacOS/Vim -gp --remote-tab $*
                  >
                  > If I call it with something like 'myvim ~/temp.txt', it will open ~/temp.txt in an existing MacVim window in a new tab.
                  >
                  > I love it!
                  >

                  Or you could just switch to MacVim and type :tabe ~/temp.txt

                  Regards,
                  Andy
                  --
                  From the desk of Andrew J Todd esq - http://www.halfcooked.com/

                  --
                  You received this message from the "vim_mac" 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
                • zabouti
                  ... Or I can drag the file s icon from the finder and drop it into my MacVim window. The point is that I can now do this right from the shell, where I tend to
                  Message 8 of 9 , Jun 16, 2012
                  • 0 Attachment
                    On Saturday, June 16, 2012 3:33:27 AM UTC-4, Andy Todd wrote:
                    > On 16/06/12 2:25 AM, zabouti wrote:
                    > > Thanks to everyone here - this is something I've wanted to do for a long time.
                    > >
                    > > Now, thanks to the suggestions here and to vim's help messages, I've made a little shell script with these two lines:
                    > >
                    > > #!/bin/sh
                    > > /Applications/MacVim.app/Contents/MacOS/Vim -gp --remote-tab $*
                    > >
                    > > If I call it with something like 'myvim ~/temp.txt', it will open ~/temp.txt in an existing MacVim window in a new tab.
                    > >
                    > > I love it!
                    > >
                    >
                    > Or you could just switch to MacVim and type :tabe ~/temp.txt
                    >
                    > Regards,
                    > Andy
                    > --
                    > From the desk of Andrew J Todd esq - http://www.halfcooked.com/

                    Or I can drag the file's icon from the finder and drop it into my MacVim window.

                    The point is that I can now do this right from the shell, where I tend to do lots of my work.

                    -- ge

                    --
                    You received this message from the "vim_mac" 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
                  Your message has been successfully submitted and would be delivered to recipients shortly.