문제

In vim you can set option with :set. For example

:set spell

to enable spell control. And

:set spellfile=/home/custom_spell.txt

to set the location of the custom spell file.

You can print the value of an option with echo. For example

echo &spellfile

Now I would like to copy the value of the option spellfile to a buffer. How can I do that?

도움이 되었습니까?

해결책

You have :put

:put=&spellfile

You have i_CTRL-R_=

blabla in insertmode ^R=&spellfile^M

(with ^R being CTRL-R typed in insert-mode, and ^M the carriage return you'll type to validate the input given to CTRL-R=)

If you want to put it into a register -> :let @a = &spellfile (or any other register name -> :h registers)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top