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

Mapping shortcuts

Expand Messages
  • George Papanikolaou
    I know this is simple. but I can t figure it out by Googling... so. How can I map a specific keyboard shortcut? For example, I want to press +F to
    Message 1 of 12 , Oct 31, 2011
    • 0 Attachment
      I know this is simple. but I can't figure it out by Googling... so.

      How can I map a specific keyboard shortcut?
      For example, I want to press <CTRL>+F to trigger FuzzyFinder instead of typing :FuF

      Thank you.

      --
      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
    • AK
      ... there means carriage return , i.e. Enter. -ak -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the
      Message 2 of 12 , Oct 31, 2011
      • 0 Attachment
        On 10/31/2011 01:06 PM, George Papanikolaou wrote:
        > I know this is simple. but I can't figure it out by Googling... so.
        >
        > How can I map a specific keyboard shortcut?
        > For example, I want to press<CTRL>+F to trigger FuzzyFinder instead of typing :FuF
        >
        > Thank you.
        >

        :map <c-f> :Fuf<cr>

        :help map

        <cr> there means 'carriage return', i.e. Enter.

        -ak

        --
        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
      • Sven Guckes
        ... Sven -- 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,
        Message 3 of 12 , Oct 31, 2011
        • 0 Attachment
          * George Papanikolaou <g3orge.app@...> [2011-10-31 18:08]:
          > How can I map a specific keyboard shortcut?
          > For example, I want to press <CTRL>+F to
          > trigger FuzzyFinder instead of typing :FuF

          :map <c-f> :FuF<cr>

          Sven

          --
          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
        • Chris Jones
          ... Nothing wrong with googling, but there s no guarantee whoever posted his favorite trick fully understands the problem and that whatever worked in his case
          Message 4 of 12 , Oct 31, 2011
          • 0 Attachment
            On Mon, Oct 31, 2011 at 01:06:45PM EDT, George Papanikolaou wrote:
            > I know this is simple. but I can't figure it out by Googling... so.

            Nothing wrong with googling, but there's no guarantee whoever posted his
            favorite trick fully understands the problem and that whatever worked in
            his case will not have side-effects that may be quite unsuitable in your
            case.

            Maybe now's the time for you to start working with the complete (and
            100% accurate) vim help and lose the Google-search habit...?

            Rather than start with the Vim reference manual, where non-specialists
            often find themselves overwhelmed by the sheer quantity of information
            and give up, it's probably more effective to study the Vim user manual
            one chapter at a time until you have a fair idea of vim's capabilities
            and how to put them to good use.

            You can access the user manual via:

            :help user-manual

            This gives you access to the user manual's table of contents.

            In this particular case, you will not find a ‘mappings’ section (this is
            why you often need to have at least skimmed through the entire manual
            beforehand to find what you are looking for), but there is a very clear
            (and authoritative) howto-style discussion of them under:

            |usr_40.txt| Make new commands

            Note that there is a very useful introduction to the way the Vim
            documentation is organized in:

            |usr_01.txt| About the manuals

            You may want to read it even before you read the introduction to
            mappings mentioned above.

            [...]

            CJ

            --
            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
          • Chris Jones
            On Mon, Oct 31, 2011 at 04:15:00PM EDT, Chris Jones wrote: [..] ... Actually, I take that back: a ‘/mapping ’ on the first page of the user manual
            Message 5 of 12 , Oct 31, 2011
            • 0 Attachment
              On Mon, Oct 31, 2011 at 04:15:00PM EDT, Chris Jones wrote:

              [..]

              > In this particular case, you will not find a ‘mappings’ section (this is
              > why you often need to have at least skimmed through the entire manual
              > beforehand to find what you are looking for),

              Actually, I take that back: a ‘/mapping<enter>’ on the first page of the
              user manual would have taken you to the detailed TOC that follows, where
              the contents of each section is detailed by sub-section.

              Key mapping is described in sub-section 40.1 Key mapping.

              The Vim documentation is even better than I remembered.

              CJ

              --
              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
            • Tony Mechelynck
              ... Also, IMHO there are two must read sections, about searching the help. First, hit the F1 key in vim or gvim and read what you find there. Later, when you
              Message 6 of 12 , Oct 31, 2011
              • 0 Attachment
                On 31/10/11 21:15, Chris Jones wrote:
                > On Mon, Oct 31, 2011 at 01:06:45PM EDT, George Papanikolaou wrote:
                >> I know this is simple. but I can't figure it out by Googling... so.
                >
                > Nothing wrong with googling, but there's no guarantee whoever posted his
                > favorite trick fully understands the problem and that whatever worked in
                > his case will not have side-effects that may be quite unsuitable in your
                > case.
                >
                > Maybe now's the time for you to start working with the complete (and
                > 100% accurate) vim help and lose the Google-search habit...?
                >
                > Rather than start with the Vim reference manual, where non-specialists
                > often find themselves overwhelmed by the sheer quantity of information
                > and give up, it's probably more effective to study the Vim user manual
                > one chapter at a time until you have a fair idea of vim's capabilities
                > and how to put them to good use.
                >
                > You can access the user manual via:
                >
                > :help user-manual
                >
                > This gives you access to the user manual's table of contents.
                >
                > In this particular case, you will not find a ‘mappings’ section (this is
                > why you often need to have at least skimmed through the entire manual
                > beforehand to find what you are looking for), but there is a very clear
                > (and authoritative) howto-style discussion of them under:
                >
                > |usr_40.txt| Make new commands
                >
                > Note that there is a very useful introduction to the way the Vim
                > documentation is organized in:
                >
                > |usr_01.txt| About the manuals
                >
                > You may want to read it even before you read the introduction to
                > mappings mentioned above.
                >
                > [...]
                >
                > CJ
                >

                Also, IMHO there are two "must read" sections, about searching the help.
                First, hit the F1 key in vim or gvim and read what you find there.
                Later, when you have the time, read the help chapter giving full details
                of how to search the help, at :help online-help


                Best regards,
                Tony.
                --
                "My doctor told me to stop having intimate dinners for four. Unless
                there are three other people."
                -- Orson Welles

                --
                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
              • Benjamin R. Haskell
                ... A valid point, but as with Wikipedia, if you don t want 100% accuracy (rather an introductory overview), googling is usually quicker. ... The problem is
                Message 7 of 12 , Oct 31, 2011
                • 0 Attachment
                  On Mon, 31 Oct 2011, Chris Jones wrote:

                  > On Mon, Oct 31, 2011 at 01:06:45PM EDT, George Papanikolaou wrote:
                  >> I know this is simple. but I can't figure it out by Googling... so.
                  >
                  > Nothing wrong with googling, but there's no guarantee whoever posted
                  > his favorite trick fully understands the problem and that whatever
                  > worked in his case will not have side-effects that may be quite
                  > unsuitable in your case.

                  A valid point, but as with Wikipedia, if you don't want 100% accuracy
                  (rather an introductory overview), googling is usually quicker.

                  > Maybe now's the time for you to start working with the complete (and
                  > 100% accurate) vim help and lose the Google-search habit...?

                  The problem is sometimes that it's too complete, and isn't organized by
                  the person who's looking for the information (naturally). Google often
                  cuts through that problem (e.g. by allowing synonyms that the help
                  writer didn't consider, or terms that aren't fully correct).

                  In this particular case, all of the following queries lead directly to
                  relevant information, so the OP just needed to try harder (, no offense):

                  vim mapping shortcuts -- the subject of this email, plus 'vim'
                  vim key maps
                  vim key mapping
                  vim keyboard shortcut

                  --
                  Best,
                  Ben

                  --
                  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
                • Tony Mechelynck
                  On 31/10/11 22:03, Benjamin R. Haskell wrote: [...] ... [...] Yes, the Vim help is as complete and as accurate as is humanly possible, but sometimes it
                  Message 8 of 12 , Oct 31, 2011
                  • 0 Attachment
                    On 31/10/11 22:03, Benjamin R. Haskell wrote:
                    [...]
                    > The problem is sometimes that it's too complete, and isn't organized by
                    > the person who's looking for the information (naturally). Google often
                    > cuts through that problem (e.g. by allowing synonyms that the help
                    > writer didn't consider, or terms that aren't fully correct).
                    [...]

                    Yes, the Vim help is as complete and as accurate as is humanly possible,
                    but sometimes it presents a needle-and-haystack problem. This, however,
                    has been greatly alleviated, first (in Vim 6.2 IIRC) by the :helpgrep
                    command, and later (Vim 7.x) by the helphelp.txt helpfile, which
                    centralizes all "help on searching help" (except the short summary found
                    by hitting F1) in a single place. Hence the "must read" in my previous post.

                    And I'll add here: even if you do find something which seems relevant
                    about Vim by Googling or by searching the Wikipedia, always check it
                    afterwards with the online help, where you may find that your Google
                    info is perhaps slightly out-of-date, or omits just the corner case
                    which is giving you problems now.


                    Best regards,
                    Tony.
                    --
                    "A wizard cannot do everything; a fact most magicians are reticent to
                    admit, let alone discuss with prospective clients. Still, the fact
                    remains that there are certain objects, and people, that are, for one
                    reason or another, completely immune to any direct magical spell. It
                    is for this group of beings that the magician learns the subtleties of
                    using indirect spells. It also does no harm, in dealing with these
                    matters, to carry a large club near your person at all times."
                    -- The Teachings of Ebenezum, Volume VIII

                    --
                    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
                  • AK
                    ... Vim needs a built-in google-like search. Type a few words, get a list of entries, best matches on top. helpgrep is not nearly the same thing - it s
                    Message 9 of 12 , Oct 31, 2011
                    • 0 Attachment
                      On 10/31/2011 05:43 PM, Tony Mechelynck wrote:
                      > On 31/10/11 22:03, Benjamin R. Haskell wrote:
                      > [...]
                      >> The problem is sometimes that it's too complete, and isn't organized by
                      >> the person who's looking for the information (naturally). Google often
                      >> cuts through that problem (e.g. by allowing synonyms that the help
                      >> writer didn't consider, or terms that aren't fully correct).
                      > [...]
                      >
                      > Yes, the Vim help is as complete and as accurate as is humanly possible,
                      > but sometimes it presents a needle-and-haystack problem. This, however,
                      > has been greatly alleviated, first (in Vim 6.2 IIRC) by the :helpgrep
                      > command, and later (Vim 7.x) by the helphelp.txt helpfile, which
                      > centralizes all "help on searching help" (except the short summary found
                      > by hitting F1) in a single place. Hence the "must read" in my previous
                      > post.
                      >
                      > And I'll add here: even if you do find something which seems relevant
                      > about Vim by Googling or by searching the Wikipedia, always check it
                      > afterwards with the online help, where you may find that your Google
                      > info is perhaps slightly out-of-date, or omits just the corner case
                      > which is giving you problems now.
                      >
                      >
                      > Best regards,
                      > Tony.


                      Vim needs a built-in google-like search. Type a few words, get
                      a list of entries, best matches on top.

                      helpgrep is not nearly the same thing - it's linewise, not
                      topic-wise, and it needs exact match, not synonym/tag match;
                      and out of the box, it does not easily do AND and OR searches
                      matching any order of words.

                      Basically, the idea is, "Are you already a vim expert and
                      know exactly the command you need? Boy, do we have a really
                      great tool to help you find it!"

                      Vim has a really great help system.. one of the best help
                      systems I've used... for ~2-3,000 lines of content. Unfortunately,
                      it has 130,000 lines of help.

                      -ak

                      --
                      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
                    • Matthew Pettis
                      This is a great thread -- I m all about using the manual and help when I can, but I agree, most software that has substantial documentation and is complex has
                      Message 10 of 12 , Oct 31, 2011
                      • 0 Attachment
                        This is a great thread -- I'm all about using the manual and help when I can, but I agree, most software that has substantial documentation and is complex has a help structure that is often hard to understand... I bet a lot of people would be grateful if someone would make a "How to use the documentation effectively" page for vim... I'd offer, but I really don't know it yet, but would love to read and learn from it...

                        Matt

                        On Mon, Oct 31, 2011 at 5:56 PM, AK <andrei.avk@...> wrote:
                        On 10/31/2011 05:43 PM, Tony Mechelynck wrote:
                        On 31/10/11 22:03, Benjamin R. Haskell wrote:
                        [...]
                        The problem is sometimes that it's too complete, and isn't organized by
                        the person who's looking for the information (naturally). Google often
                        cuts through that problem (e.g. by allowing synonyms that the help
                        writer didn't consider, or terms that aren't fully correct).
                        [...]

                        Yes, the Vim help is as complete and as accurate as is humanly possible,
                        but sometimes it presents a needle-and-haystack problem. This, however,
                        has been greatly alleviated, first (in Vim 6.2 IIRC) by the :helpgrep
                        command, and later (Vim 7.x) by the helphelp.txt helpfile, which
                        centralizes all "help on searching help" (except the short summary found
                        by hitting F1) in a single place. Hence the "must read" in my previous
                        post.

                        And I'll add here: even if you do find something which seems relevant
                        about Vim by Googling or by searching the Wikipedia, always check it
                        afterwards with the online help, where you may find that your Google
                        info is perhaps slightly out-of-date, or omits just the corner case
                        which is giving you problems now.


                        Best regards,
                        Tony.


                        Vim needs a built-in google-like search. Type a few words, get
                        a list of entries, best matches on top.

                        helpgrep is not nearly the same thing - it's linewise, not
                        topic-wise, and it needs exact match, not synonym/tag match;
                        and out of the box, it does not easily do AND and OR searches
                        matching any order of words.

                        Basically, the idea is, "Are you already a vim expert and
                        know exactly the command you need? Boy, do we have a really
                        great tool to help you find it!"

                        Vim has a really great help system.. one of the best help
                        systems I've used... for ~2-3,000 lines of content. Unfortunately,
                        it has 130,000 lines of help.

                         -ak


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



                        --
                        Do not seek to follow in the footsteps of the wise men of old. Seek what they sought.

                        - Matsuo Munefusa (”Basho”)

                        --
                        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
                      • Ben Fritz
                        ... http://vim.wikia.com/wiki/Learn_to_use_help Also, related to the thread, but not this specific request:
                        Message 11 of 12 , Nov 1, 2011
                        • 0 Attachment
                          On Oct 31, 9:47 pm, Matthew Pettis <matthew.pet...@...> wrote:
                          > This is a great thread -- I'm all about using the manual and help when I
                          > can, but I agree, most software that has substantial documentation and is
                          > complex has a help structure that is often hard to understand... I bet a
                          > lot of people would be grateful if someone would make a "How to use the
                          > documentation effectively" page for vim... I'd offer, but I really don't
                          > know it yet, but would love to read and learn from it...
                          >

                          http://vim.wikia.com/wiki/Learn_to_use_help

                          Also, related to the thread, but not this specific request:

                          http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1)
                          http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_2)
                          http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_3)

                          And finally:

                          http://vim.wikia.com/wiki/Category:Getting_started

                          --
                          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
                        • Eric Weir
                          ... I m impressed with the documentation that s been developed for Vim, but as a near novice that has been exactly my experience trying to use help. I ve found
                          Message 12 of 12 , Nov 4, 2011
                          • 0 Attachment
                            On Oct 31, 2011, at 6:56 PM, AK wrote:

                            > Basically, the idea is, "Are you already a vim expert and
                            > know exactly the command you need? Boy, do we have a really
                            > great tool to help you find it!"

                            I'm impressed with the documentation that's been developed for Vim, but as a near novice that has been exactly my experience trying to use help. I've found the FAQs to often be more accessible.

                            ------------------------------------------------------------------------------------------
                            Eric Weir
                            Decatur, GA
                            eeweir@...

                            "We do not inherit the earth from our ancestors,
                            we borrow it from our children."

                            - Chief Seattle.

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