yasnippet-snippets icon indicating copy to clipboard operation
yasnippet-snippets copied to clipboard

improve conversion from header file name to macro

Open yudi-matsuzake opened this issue 5 months ago • 0 comments
trafficstars

Suppose we are in the file my-header.hpp. This snippet would expand the once macro to #define MY-HEADER_H which is not an ideal expansion because the MY-HEADER_H is not a valid macro definition and my file should be _HPP (for c++) and not _H. With this modification, this snippet will expand:

  • my-header.hpp -> MY_HEADER_HPP
  • my_header.h -> MY_HEADER_H
  • my.header.hxx -> MY_HEADER_HXX

yudi-matsuzake avatar Jun 18 '25 17:06 yudi-matsuzake