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

Re: expand variable to command line

Expand Messages
  • Tim Chase
    ... then try a variant of one of my suggestions (it removes one level ... all typed literally ( and - characters as shown) -tim
    Message 1 of 9 , Sep 1, 2009
      > Thank you guys, but that doesn't expand the variable. This solution uses
      > Netrw and works only if my variable was a path. The point is not to execute
      > the command so I can continue typing it after the variable was expanded, do
      > some changes to the string which was expanded etc.

      then try a variant of one of my suggestions (it removes one level
      of "<cr>" from my previous post):

      :nnoremap <f12> :e <c-r>=$VIM<cr>

      all typed literally ("<" and ">" and "-" characters as shown)

      -tim



      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Aarto Matti
      Sorry, maybe I should open a new topic, but it s relevant to this one also. How to do the same but without mapping to keyboard key. For instance I call my
      Message 2 of 9 , Sep 1, 2009
        Sorry, maybe I should open a new topic, but it's relevant to this one also.

        How to do the same but without mapping to keyboard key. For instance I call my custom function EditVim() and it would drop me to command which already contains ":e /usr/share/vim".

        In other word I can simulate pressing ":".

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

      • Tony Mechelynck
        ... Maybe you want to have a look at ... etc. Best regards, Tony. -- DeVries s Dilemma: If you hit two keys on the typewriter, the one you don t want hits the
        Message 3 of 9 , Sep 9, 2009
          On 01/09/09 15:54, Aarto Matti wrote:
          > Sorry, maybe I should open a new topic, but it's relevant to this one also.
          >
          > How to do the same but without mapping to keyboard key. For instance I
          > call my custom function EditVim() and it would drop me to command which
          > already contains ":e /usr/share/vim".
          >
          > In other word I can simulate pressing ":".
          >
          > --
          > Aarto

          Maybe you want to have a look at

          :help :browse
          :help 'browsedir'
          :help browsefilter
          :help :execute
          :help input()
          etc.


          Best regards,
          Tony.
          --
          DeVries's Dilemma:
          If you hit two keys on the typewriter, the one you don't want
          hits the paper.

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Aarto Matti
          ... Hello, browse, browsedir and browsefilter - no GUI please. execute - doesn t let me to complete the command, it just executes it as is. input - it doesn t
          Message 4 of 9 , Sep 14, 2009
            On Wed, Sep 9, 2009 at 10:40 PM, Tony Mechelynck wrote:

            Maybe you want to have a look at

                   :help :browse
                   :help 'browsedir'
                   :help browsefilter
                   :help :execute
                   :help input()
            etc.

             
            Hello,

            browse, browsedir and  browsefilter - no GUI please.
            execute - doesn't let me to complete the command, it just executes it as is.
            input - it doesn't work with completion, e.g. file/dir names.

            The only thing I missing now is to know how to start command line mode from vim function.

            :nnoremap <f12> :e <c-r>=$VIM
            above does almost what I want (note no <CR> at the end), but how to do it without mapping to a key.

            --
            Regards,
            Aarto



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

          Your message has been successfully submitted and would be delivered to recipients shortly.