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

mapping for jumping to a tag

Expand Messages
  • Dimitar
    Hello, I have a small question here, hope someone helps. I have the following mapping in my .vimrc: nmap :exe tag . expand( ) As you see I
    Message 1 of 6 , Mar 31, 2007
      Hello,
      I have a small question here, hope someone helps.

      I have the following mapping in my .vimrc:

      nmap <C-j> :exe "tag ". expand("<cword>")<CR>

      As you see I use ctrl-j to jump to a tag because on a German keyboard
      for doing ctrl-] I have to break my fingers and press ctrl-altgr-9.

      The mapping works fine for normal files but I cannot use it for the
      vim help. The error I get there is:

      E21: Cannot make changes, 'modifiable' is off

      But ctrl-] works also in help files. I also tried to map c-j to c-]
      but it also didn't work. Can someone help?

      Thanks,
      Dimitar
    • Tobia
      ... Uh? :map works here. Tobia
      Message 2 of 6 , Mar 31, 2007
        Dimitar wrote:
        > I also tried to map c-j to c-] but it also didn't work.

        Uh? :map <C-J> <C-]> works here.


        Tobia
      • A.J.Mechelynck
        ... Yes, I use :map and it works too. Best regards, Tony. -- There s no room in the drug world for amateurs.
        Message 3 of 6 , Mar 31, 2007
          Tobia wrote:
          > Dimitar wrote:
          >> I also tried to map c-j to c-] but it also didn't work.
          >
          > Uh? :map <C-J> <C-]> works here.
          >
          >
          > Tobia
          >

          Yes, I use ":map <F9> <C-]>" and it works too.

          Best regards,
          Tony.
          --
          There's no room in the drug world for amateurs.
        • Dimitar
          ... Did you try this in a help file? ... then go to a tag and press c-j Works for me too but I hoped I can use the c-j, I do not know why should there be
          Message 4 of 6 , Apr 1, 2007
            * Tobia <tobia.conforto@...> [070331 20:35]:
            > Dimitar wrote:
            > > I also tried to map c-j to c-] but it also didn't work.
            >
            > Uh? :map <C-J> <C-]> works here.
            Did you try this in a help file?
            :help
            then go to a tag and press c-j

            <F12> Works for me too but I hoped I can use the c-j, I do not know
            why should there be a problem with nomodifiable files like vimhelp

            Dimitar
          • Tobia
            ... Yes, I tried it in a help window, both in console Vim and in GVim, before posting. I don t know where else I can find tags! Try starting vim -u NONE /
            Message 5 of 6 , Apr 1, 2007
              Dimitar wrote:
              > * Tobia <tobia.conforto@...> [070331 20:35]:
              > > :map <C-J> <C-]> works here.
              >
              > Did you try this in a help file?
              > :help
              > then go to a tag and press c-j

              Yes, I tried it in a help window, both in console Vim and in GVim,
              before posting. I don't know where else I can find tags!

              Try starting vim -u NONE / gvim -U NONE and see if the problem persists.


              Tobia
            • Dimitar
              ... It works. It seems to be a plugin I m using. Thanks for the help. I think I can fix it now. Dimitar
              Message 6 of 6 , Apr 1, 2007
                * Tobia <tobia.conforto@...> [070401 11:30]:
                > Dimitar wrote:
                > > * Tobia <tobia.conforto@...> [070331 20:35]:
                > > > :map <C-J> <C-]> works here.
                > >
                > > Did you try this in a help file?
                > > :help
                > > then go to a tag and press c-j
                >
                > Yes, I tried it in a help window, both in console Vim and in GVim,
                > before posting. I don't know where else I can find tags!
                >
                > Try starting vim -u NONE / gvim -U NONE and see if the problem persists.

                It works. It seems to be a plugin I'm using.
                Thanks for the help. I think I can fix it now.

                Dimitar

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