I usually open code.h and code.cpp at the same time.
And display them side by side vertically in a window.
Currently I use:
$ vim -O code.{h,cpp}
If vim can run some commands(to manipulate filename) just before opening a file,
I can simply use:
$ vim code
How can I write this kind of vim-script?
Edit:
file_line.vim is great.
In this case, a possible solution is to modify the argument list (see
:help) on Vim startup. It can be done using aarglist
VimEnterauto-command thatiterates over the argument list and replaces items not corresponding to
existing files with those items concatenated with certain suffixes, as
follows.