Show mappings for all function keys

Why does smartdiagram replace the Greek letter xi by a number?

Derivative of a double integral over a circular region

What would be the way to say "just saying" in German? (Not the literal translation)

Why the output signal of my amplifier is heavily distorted

Does putting salt first make it easier for attacker to bruteforce the hash?

How do we say "within a kilometer radius spherically"?

Analogy between an unknown in an argument, and a contradiction in the principle of explosion

What are the implications when matrix's lowest eigenvalue is equal to 0?

Who is "He that flies" in Lord of the Rings?

Grep Match and extract

Reference to understand the notation of orbital charts

Possible runaway argument using circuitikz

2019 gold coins to share

Please figure out this Pan digital Prince

Why Does Mama Coco Look Old After Going to the Other World?

How do i export activities related to an account with a specific recordtype?

Do you need to let the DM know when you are multiclassing?

How can I make 12 tone and atonal melodies sound interesting?

Amplitude of a crest and trough in a sound wave?

Is there a DSLR/mirorless camera with minimal options like a classic, simple SLR?

60s or 70s novel about Empire of Man making 1st contact with 1st discovered alien race

What is the logic behind charging tax _in the form of money_ for owning property when the property does not produce money?

The origin of the Russian proverb about two hares

Who won a Game of Bar Dice?



Show mappings for all function keys














3















How can I show the mappings for all function keys <F1> to <F12> at once? I know that :map <F1> shows the mapping for <F1>, and I can repeat this 12 times for each key. But is there a faster way? I have tried :map <F but that doesn't work.










share|improve this question


























    3















    How can I show the mappings for all function keys <F1> to <F12> at once? I know that :map <F1> shows the mapping for <F1>, and I can repeat this 12 times for each key. But is there a faster way? I have tried :map <F but that doesn't work.










    share|improve this question
























      3












      3








      3








      How can I show the mappings for all function keys <F1> to <F12> at once? I know that :map <F1> shows the mapping for <F1>, and I can repeat this 12 times for each key. But is there a faster way? I have tried :map <F but that doesn't work.










      share|improve this question














      How can I show the mappings for all function keys <F1> to <F12> at once? I know that :map <F1> shows the mapping for <F1>, and I can repeat this 12 times for each key. But is there a faster way? I have tried :map <F but that doesn't work.







      key-bindings






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 3 at 7:13









      husBhusB

      234




      234




















          2 Answers
          2






          active

          oldest

          votes


















          4














          You could do this with a loop:



          for i in range(1, 12) | execute 'map <F'.i.'>' | endfor


          If you don't want any output for F-keys without mappings, you can use mapcheck(), as suggested by @BLayer:



          for i in range(1, 12) | if !empty(mapcheck('<F'.i.'>')) | execute 'map <F'.i.'>' | endif | endfor


          For more details, see:



          • :help :for

          • :help :execute

          • :help range()

          • :help mapcheck()





          share|improve this answer




















          • 2





            For cleaner output, omitting non-mapped "F" keys, the execute expression could be expanded to 'if mapcheck("<F'.i.'>") != "" | map <F'.i.'> | endif'

            – B Layer
            Jun 4 at 1:18












          • Thanks for the clean and simple solution. Initially, I had thought of using regex (and later, with :filter), but it seems that a loop is better suited for this situation.

            – husB
            Jun 4 at 8:13



















          6














          The :filter allows to filter the output of certain vim commands. Currently, this is not yet supported by every Vim command, but according to :h map-listing, it should be possible. As the help states:



          The :filter command can be used to select what mappings to list. The
          pattern is matched against the lhs and rhs in the raw form.


          This means, you would need to put up a custom filter command with the raw key codes as input to the filter command. I was able to come up with this somewhat convoluted example for all <f> keys:



          exe ":filter" join(map(range(1,12), i,v -> eval('"<f'.v.'>"')), '|') ":map"


          This creates a list of each raw <f> key by using the "<f1>" form (which will then be parsed into the correct raw key code by vim (therefore, the eval() is needed). The resulting list, is then joined together into a regular expression, with each item joined by the | regex atom (OR).



          As the help states, the filter criteria will be applied to both, the left and right side of a mapping, so if the criteria matches the right side, it will be output as well.



          Note, in order to really get all mapping output, you might as well need the :map! command to get insert and commandline mappings.



          Overall this is a lot more complicated than to use the solution provided by Rich






          share|improve this answer

























          • Is it possible to do something such as :filter /raw code of <f3>/ map without using exec?

            – dedowsdi
            Jun 3 at 11:09






          • 1





            I don't think so, since one needs the special "<key>" notation

            – Christian Brabandt
            Jun 3 at 13:43












          • I guess you are right. If the raw code sequence starts with 0x80, one have to use the special "<key>" notation.

            – dedowsdi
            Jun 3 at 13:56











          • Thanks, :filter was what I was looking for. I managed to grasp the main gist behind your example but it will take me some time before I fully understand it. Also, can the example be simplified to something along the lines of "<f".'d1,2'.">"?

            – husB
            Jun 4 at 4:40












          • @husB no, because as I said, the filter works on the raw key codes.

            – Christian Brabandt
            Jun 4 at 5:50











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "599"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fvi.stackexchange.com%2fquestions%2f20192%2fshow-mappings-for-all-function-keys%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4














          You could do this with a loop:



          for i in range(1, 12) | execute 'map <F'.i.'>' | endfor


          If you don't want any output for F-keys without mappings, you can use mapcheck(), as suggested by @BLayer:



          for i in range(1, 12) | if !empty(mapcheck('<F'.i.'>')) | execute 'map <F'.i.'>' | endif | endfor


          For more details, see:



          • :help :for

          • :help :execute

          • :help range()

          • :help mapcheck()





          share|improve this answer




















          • 2





            For cleaner output, omitting non-mapped "F" keys, the execute expression could be expanded to 'if mapcheck("<F'.i.'>") != "" | map <F'.i.'> | endif'

            – B Layer
            Jun 4 at 1:18












          • Thanks for the clean and simple solution. Initially, I had thought of using regex (and later, with :filter), but it seems that a loop is better suited for this situation.

            – husB
            Jun 4 at 8:13
















          4














          You could do this with a loop:



          for i in range(1, 12) | execute 'map <F'.i.'>' | endfor


          If you don't want any output for F-keys without mappings, you can use mapcheck(), as suggested by @BLayer:



          for i in range(1, 12) | if !empty(mapcheck('<F'.i.'>')) | execute 'map <F'.i.'>' | endif | endfor


          For more details, see:



          • :help :for

          • :help :execute

          • :help range()

          • :help mapcheck()





          share|improve this answer




















          • 2





            For cleaner output, omitting non-mapped "F" keys, the execute expression could be expanded to 'if mapcheck("<F'.i.'>") != "" | map <F'.i.'> | endif'

            – B Layer
            Jun 4 at 1:18












          • Thanks for the clean and simple solution. Initially, I had thought of using regex (and later, with :filter), but it seems that a loop is better suited for this situation.

            – husB
            Jun 4 at 8:13














          4












          4








          4







          You could do this with a loop:



          for i in range(1, 12) | execute 'map <F'.i.'>' | endfor


          If you don't want any output for F-keys without mappings, you can use mapcheck(), as suggested by @BLayer:



          for i in range(1, 12) | if !empty(mapcheck('<F'.i.'>')) | execute 'map <F'.i.'>' | endif | endfor


          For more details, see:



          • :help :for

          • :help :execute

          • :help range()

          • :help mapcheck()





          share|improve this answer















          You could do this with a loop:



          for i in range(1, 12) | execute 'map <F'.i.'>' | endfor


          If you don't want any output for F-keys without mappings, you can use mapcheck(), as suggested by @BLayer:



          for i in range(1, 12) | if !empty(mapcheck('<F'.i.'>')) | execute 'map <F'.i.'>' | endif | endfor


          For more details, see:



          • :help :for

          • :help :execute

          • :help range()

          • :help mapcheck()






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jun 4 at 8:19

























          answered Jun 3 at 9:34









          RichRich

          15.8k12168




          15.8k12168







          • 2





            For cleaner output, omitting non-mapped "F" keys, the execute expression could be expanded to 'if mapcheck("<F'.i.'>") != "" | map <F'.i.'> | endif'

            – B Layer
            Jun 4 at 1:18












          • Thanks for the clean and simple solution. Initially, I had thought of using regex (and later, with :filter), but it seems that a loop is better suited for this situation.

            – husB
            Jun 4 at 8:13













          • 2





            For cleaner output, omitting non-mapped "F" keys, the execute expression could be expanded to 'if mapcheck("<F'.i.'>") != "" | map <F'.i.'> | endif'

            – B Layer
            Jun 4 at 1:18












          • Thanks for the clean and simple solution. Initially, I had thought of using regex (and later, with :filter), but it seems that a loop is better suited for this situation.

            – husB
            Jun 4 at 8:13








          2




          2





          For cleaner output, omitting non-mapped "F" keys, the execute expression could be expanded to 'if mapcheck("<F'.i.'>") != "" | map <F'.i.'> | endif'

          – B Layer
          Jun 4 at 1:18






          For cleaner output, omitting non-mapped "F" keys, the execute expression could be expanded to 'if mapcheck("<F'.i.'>") != "" | map <F'.i.'> | endif'

          – B Layer
          Jun 4 at 1:18














          Thanks for the clean and simple solution. Initially, I had thought of using regex (and later, with :filter), but it seems that a loop is better suited for this situation.

          – husB
          Jun 4 at 8:13






          Thanks for the clean and simple solution. Initially, I had thought of using regex (and later, with :filter), but it seems that a loop is better suited for this situation.

          – husB
          Jun 4 at 8:13












          6














          The :filter allows to filter the output of certain vim commands. Currently, this is not yet supported by every Vim command, but according to :h map-listing, it should be possible. As the help states:



          The :filter command can be used to select what mappings to list. The
          pattern is matched against the lhs and rhs in the raw form.


          This means, you would need to put up a custom filter command with the raw key codes as input to the filter command. I was able to come up with this somewhat convoluted example for all <f> keys:



          exe ":filter" join(map(range(1,12), i,v -> eval('"<f'.v.'>"')), '|') ":map"


          This creates a list of each raw <f> key by using the "<f1>" form (which will then be parsed into the correct raw key code by vim (therefore, the eval() is needed). The resulting list, is then joined together into a regular expression, with each item joined by the | regex atom (OR).



          As the help states, the filter criteria will be applied to both, the left and right side of a mapping, so if the criteria matches the right side, it will be output as well.



          Note, in order to really get all mapping output, you might as well need the :map! command to get insert and commandline mappings.



          Overall this is a lot more complicated than to use the solution provided by Rich






          share|improve this answer

























          • Is it possible to do something such as :filter /raw code of <f3>/ map without using exec?

            – dedowsdi
            Jun 3 at 11:09






          • 1





            I don't think so, since one needs the special "<key>" notation

            – Christian Brabandt
            Jun 3 at 13:43












          • I guess you are right. If the raw code sequence starts with 0x80, one have to use the special "<key>" notation.

            – dedowsdi
            Jun 3 at 13:56











          • Thanks, :filter was what I was looking for. I managed to grasp the main gist behind your example but it will take me some time before I fully understand it. Also, can the example be simplified to something along the lines of "<f".'d1,2'.">"?

            – husB
            Jun 4 at 4:40












          • @husB no, because as I said, the filter works on the raw key codes.

            – Christian Brabandt
            Jun 4 at 5:50















          6














          The :filter allows to filter the output of certain vim commands. Currently, this is not yet supported by every Vim command, but according to :h map-listing, it should be possible. As the help states:



          The :filter command can be used to select what mappings to list. The
          pattern is matched against the lhs and rhs in the raw form.


          This means, you would need to put up a custom filter command with the raw key codes as input to the filter command. I was able to come up with this somewhat convoluted example for all <f> keys:



          exe ":filter" join(map(range(1,12), i,v -> eval('"<f'.v.'>"')), '|') ":map"


          This creates a list of each raw <f> key by using the "<f1>" form (which will then be parsed into the correct raw key code by vim (therefore, the eval() is needed). The resulting list, is then joined together into a regular expression, with each item joined by the | regex atom (OR).



          As the help states, the filter criteria will be applied to both, the left and right side of a mapping, so if the criteria matches the right side, it will be output as well.



          Note, in order to really get all mapping output, you might as well need the :map! command to get insert and commandline mappings.



          Overall this is a lot more complicated than to use the solution provided by Rich






          share|improve this answer

























          • Is it possible to do something such as :filter /raw code of <f3>/ map without using exec?

            – dedowsdi
            Jun 3 at 11:09






          • 1





            I don't think so, since one needs the special "<key>" notation

            – Christian Brabandt
            Jun 3 at 13:43












          • I guess you are right. If the raw code sequence starts with 0x80, one have to use the special "<key>" notation.

            – dedowsdi
            Jun 3 at 13:56











          • Thanks, :filter was what I was looking for. I managed to grasp the main gist behind your example but it will take me some time before I fully understand it. Also, can the example be simplified to something along the lines of "<f".'d1,2'.">"?

            – husB
            Jun 4 at 4:40












          • @husB no, because as I said, the filter works on the raw key codes.

            – Christian Brabandt
            Jun 4 at 5:50













          6












          6








          6







          The :filter allows to filter the output of certain vim commands. Currently, this is not yet supported by every Vim command, but according to :h map-listing, it should be possible. As the help states:



          The :filter command can be used to select what mappings to list. The
          pattern is matched against the lhs and rhs in the raw form.


          This means, you would need to put up a custom filter command with the raw key codes as input to the filter command. I was able to come up with this somewhat convoluted example for all <f> keys:



          exe ":filter" join(map(range(1,12), i,v -> eval('"<f'.v.'>"')), '|') ":map"


          This creates a list of each raw <f> key by using the "<f1>" form (which will then be parsed into the correct raw key code by vim (therefore, the eval() is needed). The resulting list, is then joined together into a regular expression, with each item joined by the | regex atom (OR).



          As the help states, the filter criteria will be applied to both, the left and right side of a mapping, so if the criteria matches the right side, it will be output as well.



          Note, in order to really get all mapping output, you might as well need the :map! command to get insert and commandline mappings.



          Overall this is a lot more complicated than to use the solution provided by Rich






          share|improve this answer















          The :filter allows to filter the output of certain vim commands. Currently, this is not yet supported by every Vim command, but according to :h map-listing, it should be possible. As the help states:



          The :filter command can be used to select what mappings to list. The
          pattern is matched against the lhs and rhs in the raw form.


          This means, you would need to put up a custom filter command with the raw key codes as input to the filter command. I was able to come up with this somewhat convoluted example for all <f> keys:



          exe ":filter" join(map(range(1,12), i,v -> eval('"<f'.v.'>"')), '|') ":map"


          This creates a list of each raw <f> key by using the "<f1>" form (which will then be parsed into the correct raw key code by vim (therefore, the eval() is needed). The resulting list, is then joined together into a regular expression, with each item joined by the | regex atom (OR).



          As the help states, the filter criteria will be applied to both, the left and right side of a mapping, so if the criteria matches the right side, it will be output as well.



          Note, in order to really get all mapping output, you might as well need the :map! command to get insert and commandline mappings.



          Overall this is a lot more complicated than to use the solution provided by Rich







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jun 3 at 13:44

























          answered Jun 3 at 11:00









          Christian BrabandtChristian Brabandt

          16.5k2747




          16.5k2747












          • Is it possible to do something such as :filter /raw code of <f3>/ map without using exec?

            – dedowsdi
            Jun 3 at 11:09






          • 1





            I don't think so, since one needs the special "<key>" notation

            – Christian Brabandt
            Jun 3 at 13:43












          • I guess you are right. If the raw code sequence starts with 0x80, one have to use the special "<key>" notation.

            – dedowsdi
            Jun 3 at 13:56











          • Thanks, :filter was what I was looking for. I managed to grasp the main gist behind your example but it will take me some time before I fully understand it. Also, can the example be simplified to something along the lines of "<f".'d1,2'.">"?

            – husB
            Jun 4 at 4:40












          • @husB no, because as I said, the filter works on the raw key codes.

            – Christian Brabandt
            Jun 4 at 5:50

















          • Is it possible to do something such as :filter /raw code of <f3>/ map without using exec?

            – dedowsdi
            Jun 3 at 11:09






          • 1





            I don't think so, since one needs the special "<key>" notation

            – Christian Brabandt
            Jun 3 at 13:43












          • I guess you are right. If the raw code sequence starts with 0x80, one have to use the special "<key>" notation.

            – dedowsdi
            Jun 3 at 13:56











          • Thanks, :filter was what I was looking for. I managed to grasp the main gist behind your example but it will take me some time before I fully understand it. Also, can the example be simplified to something along the lines of "<f".'d1,2'.">"?

            – husB
            Jun 4 at 4:40












          • @husB no, because as I said, the filter works on the raw key codes.

            – Christian Brabandt
            Jun 4 at 5:50
















          Is it possible to do something such as :filter /raw code of <f3>/ map without using exec?

          – dedowsdi
          Jun 3 at 11:09





          Is it possible to do something such as :filter /raw code of <f3>/ map without using exec?

          – dedowsdi
          Jun 3 at 11:09




          1




          1





          I don't think so, since one needs the special "<key>" notation

          – Christian Brabandt
          Jun 3 at 13:43






          I don't think so, since one needs the special "<key>" notation

          – Christian Brabandt
          Jun 3 at 13:43














          I guess you are right. If the raw code sequence starts with 0x80, one have to use the special "<key>" notation.

          – dedowsdi
          Jun 3 at 13:56





          I guess you are right. If the raw code sequence starts with 0x80, one have to use the special "<key>" notation.

          – dedowsdi
          Jun 3 at 13:56













          Thanks, :filter was what I was looking for. I managed to grasp the main gist behind your example but it will take me some time before I fully understand it. Also, can the example be simplified to something along the lines of "<f".'d1,2'.">"?

          – husB
          Jun 4 at 4:40






          Thanks, :filter was what I was looking for. I managed to grasp the main gist behind your example but it will take me some time before I fully understand it. Also, can the example be simplified to something along the lines of "<f".'d1,2'.">"?

          – husB
          Jun 4 at 4:40














          @husB no, because as I said, the filter works on the raw key codes.

          – Christian Brabandt
          Jun 4 at 5:50





          @husB no, because as I said, the filter works on the raw key codes.

          – Christian Brabandt
          Jun 4 at 5:50

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Vi and Vim Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fvi.stackexchange.com%2fquestions%2f20192%2fshow-mappings-for-all-function-keys%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form