2009-04-20 17 views
16

मैं जानना चाहता हूं कि: कमांड इतिहास किसी विशेष विम सत्र के लिए कहां संग्रहीत किया जाता है। मुझे पता है कि हम इतिहास को स्क्रॉल और खोज सकते हैं। मेरा उद्देश्य उन आदेशों का एक हिस्सा लेना है जिन्हें मैंने परीक्षण और त्रुटि का उपयोग करके निष्पादित किया और एक vim स्रोत फ़ाइल बनायी है।कहां है: कमांड इतिहास संग्रहीत?

उत्तर

15

यह $ HOME/.viminfo

vim मदद आदेश से रखा गया है,:

The viminfo file is used to store: 
- The command line history. 
- The search string history. 
- The input-line history. 
- Contents of registers. 
- Marks for several files. 
- File marks, pointing to locations in files. 
- Last search/substitute pattern (for 'n' and '&'). 
- The buffer list. 
- Global variables. 
+0

धन्यवाद कि मैं वही था जो मैं ढूंढ रहा था ... मैं इसके लिए vim स्थापना dir में शिकार कर रहा था – xshyamx

1

यह .viminfo फ़ाइल में (या _viminfo यदि आप Windows पर हैं)। यह आपके घर निर्देशिका के लिए जो कुछ भी गुजरता है वह होना चाहिए।

2

आप histget(), histadd() और histdel() कार्यों की तलाश में हैं।

संपादित करें: viminfo फ़ाइल में कई सत्रों से इतिहास डेटा होगा, जो मुझे लगता है, आप पहले से ही जानते थे, जिस तरह से आपने अपना प्रश्न तैयार किया था।

5

तुम भी q: या :<CTRL-F> आदेशों

OPEN 

There are two ways to open the command-line window: 
1. From Command-line mode, use the key specified with the 'cedit' option. 
    The default is CTRL-F when 'compatible' is not set. 
2. From Normal mode, use the "q:", "q/" or "q?" command. *q:* *q/* *q?* 
    This starts editing an Ex command-line ("q:") or search string ("q/" or 
    "q?"). Note that this is not possible while recording is in progress (the 
    "q" stops recording then). 

When the window opens it is filled with the command-line history. The last 
line contains the command as typed so far. The left column will show a 
character that indicates the type of command-line being edited, see 
|cmdwin-char|. 

आप इस विंडो के आसपास स्थानांतरित कर सकते हैं, और बस की तरह नकल का उपयोग कर एक minibuffer में अपने हाल के आदेश इतिहास खोल सकते हैं एक सामान्य बफर कमांड पर <Enter> मारना इसे निष्पादित करेगा।

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