views:

151

answers:

2

Problem: to move upwards in Vim's Taglist by "t"

The movement keys DHTN work in Vim when I am not in TagList.

I have the following in my .vimrc

 no h j 
 no t k 
 no n l 
 no s : 
 no S : 
 no j d 
 no J D 
 no l n 
 no L N
 no - $ 
 no _ ^ 
 no N 
 no ; z 
 no T L 
 no P P 
 no p p

How can you enable the movement key "t" also in TagList?

A: 

The problem is that Tag List has defined very specific action to these keys, so rebinding them has moved functionality on top of it and can not be used to shift responsibility. There might be another way, but you can edit taglist.vim at line :1560 and :1562

      nnoremap <buffer> <silent> t
      nnoremap <buffer> <silent> <C-t>

change 't' to the letter you want, maybe 'l'. You will also find all the other key bindings in this area. While not needed or affected by these changes, you can also update the help message if you change other bindings starting at line :535

he_the_great
A: 

The problem can be solved by adding the following to your .vimrc

if v:version >= 700                                                                                                                                                                                           
         nnoremap <buffer> <silent> t
                     \ 
         nnoremap <buffer> <silent> <C-t>
                     \ 
         endif

Response to Great's question:

I remaped the key unsuccessfully by adding the following to my .vimrc

if v:version >= 700
         nnoremap <buffer> <silent> l
                     \ :call <SID>Tlist_Window_Jump_To_Tag('checktab')<CR>
         nnoremap <buffer> <silent> <C-l>
                     \ :call <SID>Tlist_Window_Jump_To_Tag('newtab')<CR>
         endif

How would you do the remap?

Masi
What does this do? Is he still able to jump to the tag i.e. what 't' is supposed to do?
he_the_great
@Great: Please, see the change in my answer.
Masi
My solution was to modify the taglist.vim file to use a different key. I'm guessing that plugins are loaded after .vimrc which might be why your solution didn't work.
he_the_great
@Great: Then, a new problem is: How can you make your .vimrc to load up last?
Masi