Yapılandırma öğelerinizi saklamak için en iyi yer .vimrc
dosyanızdır. Ancak, çok erken kaynaklandı, kontrol edin :h startup:
At startup, Vim checks environment variables and files and sets values
accordingly. Vim proceeds in this order:
1. Set the 'shell' and 'term' option *SHELL* *COMSPEC* *TERM*
2. Process the arguments
3. Execute Ex commands, from environment variables and/or files *vimrc* *exrc*
4. Load the plugin scripts. *load-plugins*
5. Set 'shellpipe' and 'shellredir'
6. Set 'updatecount' to zero, if "-n" command argument used
7. Set binary options
8. Perform GUI initializations
9. Read the viminfo file
10. Read the quickfix file
11. Open all windows
12. Execute startup commands
Gördüğünüz gibi, .vimrc dosyanız eklentilerden önce yüklenecek. Eğer içine koyarsanız :FindFileCache ., o komut henüz mevcut olmadığı için bir hata oluşacaktır. (Eklenti 4. adımda yüklendikten sonra mevcut olacaktır.)
Bunu çözmek için, komutu doğrudan yürütmek yerine bir otomatik komut oluşturun. Otomatik komutlar, bir olay meydana geldiğinde bazı komutları yürütür. Bu durumda, VimEnter olayı uygun görünüyor (şuradan :h VimEnter):
*VimEnter*
VimEnter After doing all the startup stuff, including
loading .vimrc files, executing the "-c cmd"
arguments, creating all windows and loading
the buffers in them.
Ardından, bu satırı .vimrc dosyanıza yerleştirin :
autocmd VimEnter * FindFileCache .