I’m new to Sublime Text…using the beta version “3” currently…and only 3 days using the application. It’s definitely an amazing application.
Installed Packages thus far: Open-Include, SideBarEnhancements
So here’s where I need direction -
Insight to issue:
I have thousands of .xml files that I have to add specific header/footer syntax into each one. (Header/Footer syntax is always the same for each file.) What I would like to accomplish is automating this process even more than I already have if possible.
Steps I have taken thus far to perform this action manually:
- Created 2 different Snippets (1 for the Header, 1 for the Footer)
- Recorded a Macro that places each item accordingly into a .xml file
- Utilize the SideBarEnhancement and Open-Include to perform the following function
a. keymap to launch the “side_bar_find_files_path_containing”
b. keymap to open all highlighted files (Alt+D) - Created a basic Plugin to execute the “save_all” and “close_all” Windows Commands in one swoop when the editing is done.
Here’s my current process that I’m testing against 20 .xml files
- Launch the "“side_bar_find_files_path_containing”
TAB: Instant File Search
Type to search: - Enter appropriate text to locate necessary files
- Use a combination of keymaps to select all required files produced from the “find” action
- Execute the Alt+D to open all highlighted files
- Keymap to execute Macro
- Keymap to execute “Next file in stack”
- Repeat steps 5,6 until I’m through all the files (I realize this should be executed per a “loop” scenario)
- Keymap to execute the Plugin for mass “save_all” and “close_all”
I’m just curious what the best plan of action would be…meaning, is this going to require a series of multiple PLUGINS to accomplish this and then placing into a PACKAGE?
Is it possible for me to combine a number of WindowCommand and TextCommand into one PLUGIN?
I’m a pretty quick learner if I could just get some decent suggestions on where to take all of this to automate the process rather than manually executing a number of keymappings over and over and over again.
I appreciate any direction someone could offer to me. Thanks.