Today I was struggled with one of the worst behavior of Vim script.
Try the following code on your Vim.
:!echo "#!"
Assuming you know that the command :!
is to run the given command on your shell. This looks equivalent to
$ echo "#!"
on your terminal.
But Vim will show a cryptic error. That's because both #
and !
are special letters for :!
command.
!
is the command previously ran. This is for the pseudo command:!!
which means that running the same command again.#
is the filename previously you edited.- Similar in
%
They may be useful for using Vim, but they make Vim script programmers crazy.
No comments:
Post a Comment