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

How to open mvim with current dir set to where I am in term? (I did search for this and know it's been asked.)

Expand Messages
  • Rick R
    I know this has been asked before but the answers in the email search results seem to be all over the place so pardon for asking what I know has come up
    Message 1 of 7 , Dec 1, 2009
    • 0 Attachment
      I know this has been asked before but the answers in the email search results seem to be all over the place so pardon for asking what I know has come up before...

      I often want to open up a project in mvim while navigating in terminal to the project dir and then opening up mvim (and then NERDTree) , similar to how I can do in textMate by just typing mate within a dir. Right now mvim always opens to my home dir. Is there an option I can use to configure it to open up to the current directory that I'm located in within my terminal?


      --
      Rick R

      --
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Tyson Roberts
      mvim mvim /tmp For instance. If you want to do this automatically, you can create a bash alias: alias dirvim= mvim `pwd` ... -- You received
      Message 2 of 7 , Dec 1, 2009
      • 0 Attachment
        mvim <directory name>

        mvim /tmp

        For instance.

        If you want to do this automatically, you can create a bash alias:

        alias dirvim='mvim `pwd`'



        On Wed, Dec 2, 2009 at 8:10 AM, Rick R <rickcr@...> wrote:
        I know this has been asked before but the answers in the email search results seem to be all over the place so pardon for asking what I know has come up before...

        I often want to open up a project in mvim while navigating in terminal to the project dir and then opening up mvim (and then NERDTree) , similar to how I can do in textMate by just typing mate within a dir. Right now mvim always opens to my home dir. Is there an option I can use to configure it to open up to the current directory that I'm located in within my terminal?


        --
        Rick R

        --
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php

        --
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Rick R
        Cool thanks. Just doing mvim . works fine for the dir I m in. ... -- Rick R -- You received this message from the vim_mac maillist. For more information,
        Message 3 of 7 , Dec 1, 2009
        • 0 Attachment
          Cool thanks.
          Just doing
          mvim .
          works fine for the dir I'm in.

          On Tue, Dec 1, 2009 at 7:56 PM, Tyson Roberts <nallohki@...> wrote:

          mvim <directory name>

          mvim /tmp

          For instance.

          If you want to do this automatically, you can create a bash alias:

          alias dirvim='mvim `pwd`'



          On Wed, Dec 2, 2009 at 8:10 AM, Rick R <rickcr@...> wrote:
          I know this has been asked before but the answers in the email search results seem to be all over the place so pardon for asking what I know has come up before...

          I often want to open up a project in mvim while navigating in terminal to the project dir and then opening up mvim (and then NERDTree) , similar to how I can do in textMate by just typing mate within a dir. Right now mvim always opens to my home dir. Is there an option I can use to configure it to open up to the current directory that I'm located in within my terminal?


          --
          Rick R

          --
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php

          --
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php



          --
          Rick R

          --
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
        • björn
          ... This should not be necessary...simply typing mvim should open up MacVim in the current directory (I do this all the time). Please follow the instructions
          Message 4 of 7 , Dec 2, 2009
          • 0 Attachment
            2009/12/2 Rick R:
            > Cool thanks.
            > Just doing
            > mvim .
            > works fine for the dir I'm in.

            This should not be necessary...simply typing "mvim" should open up
            MacVim in the current directory (I do this all the time).

            Please follow the instructions at

            http://code.google.com/p/macvim/wiki/ReportingBugs

            and see if you can figure out what causes the problem.

            Björn

            --
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
          • Rick R
            Ok, I m using Snapshot 49. I followed the instructions as described below (moved my .vimrc, .vim, and a .gvimrc to a backup) and ran the defaults command to
            Message 5 of 7 , Dec 2, 2009
            • 0 Attachment
              Ok, I'm using Snapshot 49. I followed the instructions as described  below (moved my .vimrc, .vim, and a .gvimrc to a backup) and ran the defaults command to reset them.

              Then in terminal I migrate to a directory beneath /Users/rick ie /Users/rick/temp and type "mvim"

              When I type :pwd it's displaying /Users/rick not /Users/rick/temp

              On Wed, Dec 2, 2009 at 4:39 AM, björn <bjorn.winckler@...> wrote:
              2009/12/2 Rick R:
              > Cool thanks.
              > Just doing
              > mvim .
              > works fine for the dir I'm in.

              This should not be necessary...simply typing "mvim" should open up
              MacVim in the current directory (I do this all the time).

              Please follow the instructions at

              http://code.google.com/p/macvim/wiki/ReportingBugs

              and see if you can figure out what causes the problem.

              Björn

              --
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php



              --
              Rick R

              --
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
            • björn
              ... ...and you are certain that you re using the mvim script that comes bundled with the snapshot? (btw the latest version is 51) It sounds to me like your
              Message 6 of 7 , Dec 2, 2009
              • 0 Attachment
                2009/12/2 Rick R:
                > Ok, I'm using Snapshot 49. I followed the instructions as described  below
                > (moved my .vimrc, .vim, and a .gvimrc to a backup) and ran the defaults
                > command to reset them.
                >
                > Then in terminal I migrate to a directory beneath /Users/rick ie
                > /Users/rick/temp and type "mvim"
                >
                > When I type :pwd it's displaying /Users/rick not /Users/rick/temp

                ...and you are certain that you're using the "mvim" script that comes
                bundled with the snapshot? (btw the latest version is 51) It sounds
                to me like your "mvim" is simply an alias to "open -a MacVim.app".
                What is the response if you open Terminal and enter

                which mvim
                alias mvim

                ?

                What happens if you open up Terminal.app and enter

                /Applications/MacVim.app/Contents/MacOS/Vim -f -g

                ? (Assuming you've placed MacVim.app in your Applications folder,
                adjust the path otherwise.)

                Björn

                --
                You received this message from the "vim_mac" maillist.
                For more information, visit http://www.vim.org/maillist.php
              • Rick R
                Thanks Bjorn. That was the problem.. stupid me. I did have an alias in there starting up MacVim. I moved the mvim script to my home bin which is on my path and
                Message 7 of 7 , Dec 2, 2009
                • 0 Attachment
                  Thanks Bjorn. That was the problem.. stupid me. I did have an alias in there starting up MacVim. I moved the mvim script to my home bin which is on my path and removed the alias and now things are well.

                  (Sorry for the confusion and thanks for you patience. I had installed MacVim a while ago and must have set up that alias at that time, I then started using TextMate but now I'm back to MacVim (I'd rather get good at one editor that I can use on all systems.) I also had the mvim script in /usr/bin and thought that's what was being called instead of the alias (that might have been an older mvim script though, not even a snapshot. I removed that one as well.)


                  On Wed, Dec 2, 2009 at 12:41 PM, björn <bjorn.winckler@...> wrote:
                  2009/12/2 Rick R:
                  > Ok, I'm using Snapshot 49. I followed the instructions as described  below
                  > (moved my .vimrc, .vim, and a .gvimrc to a backup) and ran the defaults
                  > command to reset them.
                  >
                  > Then in terminal I migrate to a directory beneath /Users/rick ie
                  > /Users/rick/temp and type "mvim"
                  >
                  > When I type :pwd it's displaying /Users/rick not /Users/rick/temp

                  ...and you are certain that you're using the "mvim" script that comes
                  bundled with the snapshot? (btw the latest version is 51)  It sounds
                  to me like your "mvim" is simply an alias to "open -a MacVim.app".
                  What is the response if you open Terminal and enter

                  which mvim
                  alias mvim

                  ?

                  What happens if you open up Terminal.app and enter

                  /Applications/MacVim.app/Contents/MacOS/Vim -f -g

                  ?  (Assuming you've placed MacVim.app in your Applications folder,
                  adjust the path otherwise.)

                  Björn

                  --
                  You received this message from the "vim_mac" maillist.
                  For more information, visit http://www.vim.org/maillist.php



                  --
                  Rick R

                  --
                  You received this message from the "vim_mac" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                Your message has been successfully submitted and would be delivered to recipients shortly.