xolox / vim-easytags

Automated tag file generation and syntax highlighting of tags in Vim
http://peterodding.com/code/vim/easytags/
1.01k stars 109 forks source link

Change "go to definition" shortcut #130

Closed ricpelo closed 8 years ago

ricpelo commented 8 years ago

Currently, the "go to definition" shortcut is Ctrl-]. It's very hard to use in my Spanish keyboard, because the ] key needs to be used with AltGr, so the final shortcut is Ctrl-AltGr-]. Is there a way to change that shortcut?

xolox commented 8 years ago

As an example, add the following to your vimrc script:

map <F5> <C-]>

This creates a (normal mode) key mapping that makes the F5 key do the same thing that the Control-] combination does. To achieve the same effect from insert mode:

imap <F5> <C-o><C-]>

Now to make either of these practically usable you need to decide what key combination you want to use (instead of F5). If you run the Vim command :help key-mapping you'll get a Vim help file explaining the basics. Good luck!

ricpelo commented 8 years ago

Thank you very much!