Sublime Forum

Idea of creating personal code reference list

#1

Googled and also searched in this forum but was not able to locate what i was looking for so decided to ask if anyone knows or have recommendation before i start building plugin for this.

I have C/C++.chm which I use to lookup functions that I wish to use but generally I often have to dig in the document to look for specific function which I would like to use. so i have my own code reference list like below in separate file.

=============================
example file of personal code reference list

Ref
… - Data Types
… - int
… - double
… - float
… - {continue}
… + Pre-Processors
… - Functions
… - Lists
… - pop_back
… - pop_front
… - {continue}
… + Math
… + {continue}

wanted to import this file into Sublime Text somehow that i can navigate through available list quickly with the way i have created and when i select it, the item will be insert into the code that i am working in the Sublime Text.

one way that i can think how to achieve this is using snippet and navigate through command palette but command palette only show one level (no tree list) and need to insert the extra items from the list and delete every time.

there was side panel plugin for folder/file but maybe there is side panel function in Sublime Text that i can use to achieve this but have not found that i can show tree list like function to embed my reference list and insert the item into the code.

appreciated for any suggestion or help on this.
kind regards,

0 Likes

#2

I store my reference code on github’s gist and use the Gist plugin to access/reference my code. This gives you two levels to store your code, first level are the gists and the second level are the files within the gist.

0 Likes

#3

one major limitation though is that it would require you to be online to access your code. You can use gist (or its structure) as the base of the plugging you are planning on developing. I was planning on forking the plug-in and have it store a local copy of my code but it never left that planning stages.

0 Likes

#4

Take a look at snippets.

Or, if you are versed in Python or want to be, you could easily code something together as a plugin.

0 Likes

#5

thanks guys, will look into those options.

0 Likes