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

Shortcuts within a special scope

Expand Messages
  • jerikmail@googlemail.com
    Hi, I am wondering if it is possible to map shortcuts only to a special scope (= filetpye = foo) For Example: CTRL+N in Insert Mode. I want to map this
    Message 1 of 2 , Dec 1, 2007
    View Source
    • 0 Attachment
      Hi,

      I am wondering if it is possible to map shortcuts only to a special
      scope (= filetpye = foo)

      For Example: CTRL+N in Insert Mode.
      I want to map this shortcut to the function Foo() when the filetype is
      set to 'foo'.

      Is this possible? And when How do I do this ?

      cheers -- jerik


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • thomas
      ... If by scope you mean the buffer s filetype, you could put the map command in after/ftplugin/foo.vim and user the argument. ... HTH Thomas.
      Message 2 of 2 , Dec 1, 2007
      View Source
      • 0 Attachment
        > I am wondering if it is possible to map shortcuts only to a special
        > scope (= filetpye = foo)

        If by scope you mean the buffer's filetype, you could put the map
        command in after/ftplugin/foo.vim and user the <buffer> argument.

        :h :map-local

        HTH
        Thomas.

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