Vim Recall繁體中文

Save current mappings and settings to a file

:mkexrc

Example

Normal 0 / 2

Save current mappings and settings to a file.

Prepared workspace

Options
number enabled
Global mapping
<F6> → :set number!<CR>

Output file

example.exrc
absent
Before & after

Before

Prepared workspace

Options
number enabled
Global mapping
<F6> → :set number!<CR>

Output file

example.exrc
absent

After

Prepared workspace

Options
number enabled
Global mapping
<F6> → :set number!<CR>

Configuration script written

Filename
example.exrc
Meaningful contents
global <F6> mapping runs :set number!<CR>; window-local number state is not saved
Representation
summary; generated script includes version-dependent setup

Documentation-backed illustration. the example directory is writable and the target file does not exist. :mkexrc writes example.exrc. The files panel summarizes what the generated script restores; saving it does not close or restore the current session. Primary help: :mkexrc.

Sample buffer
alpha
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 :mk[exrc] 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.