A Sublime Text 3 plugin for combining tabular data with snippets
- Total 2K
- Win 1K
- OS X 299
- Linux 252
|Aug 20||Aug 19||Aug 18||Aug 17||Aug 16||Aug 15||Aug 14||Aug 13||Aug 12||Aug 11||Aug 10||Aug 9||Aug 8||Aug 7||Aug 6||Aug 5||Aug 4||Aug 3||Aug 2||Aug 1||Jul 31||Jul 30||Jul 29||Jul 28||Jul 27||Jul 26||Jul 25||Jul 24||Jul 23||Jul 22||Jul 21||Jul 20||Jul 19||Jul 18||Jul 17||Jul 16||Jul 15||Jul 14||Jul 13||Jul 12||Jul 11||Jul 10||Jul 9||Jul 8||Jul 7|
Turn tabular data into code!
SnippetX takes comma-seperated data (csv) and combines it with a snippet of your choosing. It's like xarg but for snippets.
Download it using Package Control.
Place comma-seperated values in your view or open a csv file. At the bottom or top add 'sx:' followed by the tabTrigger of the snippet you'd like to use as show here:
Make sure there are newlines between the data you want manipulated and anything else. Hit Alt+x. Each line will replaced with the snippet you chose, with the data from the line placed in the snippet.
What snippets can I use?
With the exception of built in snippets, any snippet that has a tab trigger can be used. Nothing special has to be added to make this work. The snippets you use everyday work fine with SnippetX.
Where the data ends up depends on it's column number and sublime placeholder. IE, anything in column one maps to placeholder $1. You can use the placeholders out of order or multiple times and you can give them default values, in the event that your data has missing fields. If there are more placeholders than columns then the last few placeholders will be either empty or default values. If there are more columns than placeholders than SnippetX will use only as many columns as there are placeholders (Note that the full line would still be replaced).
MIT © Colin Ryan