Add script to replace <includehints> with includes #3

Merged
blu.256 merged 1 commits from feat/replace_includehints into master 2 years ago
Collaborator

The script automagically finds UI files containing <includehints> and replaces those with includes, while taking care to remove duplicate includes.

It may not be that useful for most existing applications where this has been fixed but it could come handy when porting new applications to TDE.

The script automagically finds UI files containing `<includehints>` and replaces those with includes, while taking care to remove duplicate includes. It may not be that useful for most existing applications where this has been fixed but it could come handy when porting new applications to TDE.
blu.256 added 1 commit 2 years ago
fcb8c45f5e
Add script to replace <includehints> with includes
blu.256 added the PR/rfc label 2 years ago
SlavekB reviewed 2 years ago
SlavekB left a comment
Owner

Great, it works well.

You can notice that none of the existing scripts have extensions .sh. This probably makes sense to make this script equally.

Great, it works well. You can notice that none of the existing scripts have extensions `.sh`. This probably makes sense to make this script equally.
Owner

Side note commment:
This script from Philippe makes me appreciate vim even more. Short macro + fzf search + cfdo command 😉

function! DoIH()
  normal gg
  :g/<includehints/ .+1,/\/includehints/-1 !sort
  :g/<includehints/ .+1,/\/includehints/-1 !uniq
  :%s/includehints/includes/
  :%s/<\/includehint>/<\/include>/
  :%s/<includehint>/<include location="global" impldecl="in implementation">/
  :g/<includes/ .+1,/\/includes/-1 !sort
endfunction
Side note commment: This script from Philippe makes me appreciate vim even more. Short macro + fzf search + cfdo command :wink: ``` function! DoIH() normal gg :g/<includehints/ .+1,/\/includehints/-1 !sort :g/<includehints/ .+1,/\/includehints/-1 !uniq :%s/includehints/includes/ :%s/<\/includehint>/<\/include>/ :%s/<includehint>/<include location="global" impldecl="in implementation">/ :g/<includes/ .+1,/\/includes/-1 !sort endfunction ```
Owner

@blu.256
Philippe, I think we can merge this once the script is renamed as per Slavek's comment. Don't get distracted by my comment on the power of vim :-)

@blu.256 Philippe, I think we can merge this once the script is renamed as per Slavek's comment. Don't get distracted by my comment on the power of vim :-)
blu.256 force-pushed feat/replace_includehints from fcb8c45f5e to 1b670e287c 2 years ago
Poster
Collaborator

@MicheleC Vim can be powerful indeed ;-)

Renamed, so merging.

@MicheleC Vim can be powerful indeed ;-) Renamed, so merging.
blu.256 merged commit 1b670e287c into master 2 years ago
blu.256 deleted branch feat/replace_includehints 2 years ago
SlavekB added this to the R14.1.0 release milestone 2 years ago
Owner

Vim can be powerful indeed ;-)

Very powerful 😉

> Vim can be powerful indeed ;-) Very powerful 😉
The pull request has been merged as 1b670e287c.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/scripts#3
Loading…
There is no content yet.