Vim Recall繁體中文

Save current mappings and settings to a file

:mkvimrc

Example

Normal 0 / 2

Save current mappings and settings to a file.

Current configuration

Global mapping
nnoremap <F5> :echo 'ready'<CR>
Global option
ignorecase on

Files

recall.vim
absent
Before & after

Before

Current configuration

Global mapping
nnoremap <F5> :echo 'ready'<CR>
Global option
ignorecase on

Files

recall.vim
absent

After

Current configuration

Global mapping
nnoremap <F5> :echo 'ready'<CR>
Global option
ignorecase on

Files

Representative saved entries:
version 6.0
nnoremap <F5> :echo 'ready'<CR>
set ignorecase
… other generated settings …
recall.vim
created: Vim script restoring global mappings and settings

Subject: :mkvimrc. Documentation-backed illustration; assumes writable fixture directory, recall.vim absent, and the displayed global mapping/option; not replay-verified. Creates recall.vim with :map/:set commands for the current global mappings and options. Buffer-local mappings and window-local options such as number are excluded. File excerpt is abbreviated.

Sample buffer
chapter one
chapter two
chapter three
Cursor on line 1, column 1
Details & Vim help

Save current mappings and settings to a file. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :mkv[imrc] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.