2009-04-20 21 views
16

Komut geçmişinin belirli bir vim oturumu için nerede saklandığını bilmek istiyorum. Tarih boyunca ilerleyip tarayabileceğimizi biliyorum. Amacım, deneme ve hata kullanarak yürüttüğüm komutların bir kısmını almak ve bir vim kaynak dosyası oluşturmak.burada: komut geçmişi saklanıyor mu?

cevap

15

o vim yardım komutunu $ HOME/.viminfo

saklanır:

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

tam olarak aradığımı sağladığım için teşekkürler ... – xshyamx

1

O .viminfo dosyada var (veya Windows üzerinde ise _viminfo). Ev dizininiz için ne olursa olsun geçmelidir.

2

histget(), histadd() ve histdel() işlevlerini arıyorsunuz.

DÜZENLEME: viminfo dosyası, sorunuzu formüle ettiğiniz şekle göre, önceden bildiğiniz gibi, birkaç oturumdan geçmiş verileri içerir. Ayrıca q: veya :<CTRL-F> komutları

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|. 

Bu pencerede hareket ve tıpkı kopyalayabilirsiniz kullanarak minibuffer yakın zamandaki komut geçmişini açabilirsiniz

1
:h viminfo-file-name 

HTH normal bir tampon. Bir komutun üzerine <Enter> isabet ettirmek, onu çalıştıracaktır.