Is it possible to execute a VIM command inside a text file that is opened by VIM? For example we can have the following text and we would like to execute :help w without typing it.
Read the text in the help window to find out how the help works.
Type CTRL-W CTRL-W to jump from one window to another.
Type :q <ENTER> to close the help window.
You can find help on just about any subject, by giving an argument to the
":help" command. Try these (don't forget pressing <ENTER>):
:help w
:help c_CTRL-D
:help insert-index
:help user-manual
You could create the following map to execute the command defined in the current line:
nnoremap <c-e> :exe getline('.')<cr>
Placing the cursor in the line with :help w and typing Ctrl+E will open the help page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With