If i'm editing a file, such as
/src/test/service.spec.js
And I want to echo service
using expand
, is there a better way than:
:echo expand("%:t:r:r")
I want to be able to handle cases where multiple file extensions might be present, and doing :r:r
seems a bit narrow.