2011-01-28 19 views
18

मैं विम के भीतर से tags फ़ाइल को फिर से लोड कैसे करूं?टैग फ़ाइल को दोबारा लोड करें Vim

पुनरारंभ करना आवश्यक है?

+0

इसे पुनः लोड करने की कोई आवश्यकता नहीं है, vim इसे स्मृति में नहीं रखता है। जब भी आप एक टैग की तलाश में हों तो यह फ़ाइल की कुछ बाइनरी खोज करेगा। – Benoit

+0

दिन पहले, मुझे नई 'टैग' फ़ाइल को प्रभावी बनाने के लिए विम पुनरारंभ करना होगा। विम संस्करण: '7.2' –

+0

हो सकता है कि अलग-अलग उप निर्देशिकाओं में एकाधिक टैग फ़ाइलें हों और गलत को पुन: उत्पन्न कर रहे हों? – jberryman

उत्तर

17

:help tag-binary-search के अनुसार, टैग फ़ाइल बाइनरी (या रैखिक) प्रत्येक देखने पर खोज की है, इसलिए फ़ाइल को फिर से लोड करने के लिए कोई ज़रूरत नहीं है:

             *tag-binary-search* 
Vim uses binary searching in the tags file to find the desired tag quickly 
(when enabled at compile time |+tag_binary|). But this only works if the 
tags file was sorted on ASCII byte value. Therefore, if no match was found, 
another try is done with a linear search. If you only want the linear search, 
reset the 'tagbsearch' option. Or better: Sort the tags file! 

Note that the binary searching is disabled when not looking for a tag with a 
specific name. This happens when ignoring case and when a regular expression 
is used that doesn't start with a fixed string. Tag searching can be a lot 
slower then. The former can be avoided by case-fold sorting the tags file. 
See 'tagbsearch' for details. 
+0

मुझे खेद है, लेकिन आपके उद्धरण में कहां कहा गया है? – asymmetric

+0

मुझे लगता है कि यह निहित है (फ़ाइल को फ़ाइल में बाइनरी खोज क्यों होगी यदि फ़ाइल किसी बिंदु पर स्मृति में लोड की गई थी?)। – jrdioko

4

जहां तक ​​मुझे पता है कि यह आवश्यक नहीं है Vim 7.3 tags फ़ाइल को जितनी जल्दी उत्पन्न हो सके उसका उपयोग करें।

0

मैं यह सिर्फ एक और में टैग फ़ाइल को लोड करने में मदद करता है खोजने के बफर/टैब। फिर मैं अपने टैग अपडेट देखने के लिए vim प्राप्त करने के लिए :e! के साथ उस बफर को पुनः लोड कर सकता हूं।

संबंधित मुद्दे