yegappan / fileselect

File Selector Vim Plugin
BSD 2-Clause "Simplified" License
18 stars 2 forks source link

refactor :let into :var #4

Closed lacygoill closed 4 years ago

lacygoill commented 4 years ago

Since 8.2.1788, we can no longer use :let to assign a variable. So I refactored all the :lets into :vars. Alternatively, we could also set v:disallow_let to 0. But I thought using :var would be better, because that's what is used everywhere at :h vim9.

The rationale behind this new assignment command is given at :h vim9-rationale:

Legacy Vim script uses :let for every assignment, while in Vim9 declarations are used. That is different, thus it's good to use a different command: :var. This is used in many languages. The semantics might be slightly different, but it's easily recognized as a declaration.