How to use ctags for code documentation - documentation

I have some source code that I want to document without touching the code. For every source file (e.g., example.cpp, example.f90, etc.) I would like to have a separate documentation file (e.g., example.cpp.doc, example.f90.doc) that has some metadata (ctag) linking it to the original source file.
Ideally I could open the source file and the documentation file in parallel views in my favorite editor (ViM) and have the two files synced so that they scroll together. In this manner, I can keep my documentation visually inline with the un-touched source code.
I know this is likely to be a unique scenario. But I'm hoping someone else has already figured this out.
Is this even a possibility?

Create the initial .doc structure outside of Vim such that the "metadata" you want to keep is in the same line number as the original file.
Then open the two files in different Vim windows with vim -O example.cpp example.cpp.doc. At this point use :windo set scrollbind to enable scroll binding, which will allow to navigate any of the windows while keeping both in sync.

Related

How to efficiently work with related files in PhpStorm/WebStorm/IntelliJ IDEA?

I used to put my CSS, HTML, and JS all in the same file just so I could keep them grouped, open all at the same time, close all at the same time, and just search for style or script tags to switch between contexts. Now I'm using some tools that require these to be separated into their own files, and I'm finding it frustrating to be switching between these files all the time efficiently.
I've searched the web and documentation extensively for some advice. I've found I can:
create all the files together with a multi file template
configure files with the same name in the same folder to be nested.
However, I still cannot figure out how to do anything like the following:
open all related files together
when I close one file, close all other related files
Switch to a specific related file with a keyboard shortcut in the current tab/view
Open or go to a specific related file with a keyword shortcut in the opposite tab/view
Are there any keyboard shortcuts, tools, plugins, or intelligent approaches to work with related files in IntelliJ IDEA?

File-based, not Folder-based, Projects in Atom?

I'm trying to switch to Atom as my programming editor so that I can gain handy features like linting for Perl, JavaScript, etc. However, over the last two decades, I've used a string of editors (UltraEdit, jEdit, BBEdit) that allowed me to add individual files from different folders into projects. My main coding project actually spans several remote SFTP servers and the "folders" in my BBEdit project do not necessarily correspond to any file structure on disk.
I cannot seem to figure out how to set up a project in this manner in Atom (or similar editors such as Brackets). Is there a way to configure Atom and its extensions to produce a result similar to an UltraEdit/jEdit/BBEdit/Komodo project? I thought about creating a new project directory and symlinking to the real files, but that seems like a hack at best.
I belive its File > Open Project or something like that. I personally like Sublime Text 3 but Atom and Sublime are the same.
The best solution I have found so far would be to install opened-files package. By default it persists all files you have opened (even after you close them) until you close atom editor. I don't think it would work well for bigger projects as it lists all the files under one tab in tree view.
If you want to persist open files you might want to use project-manager package. To keep files listed under 'Opened files' tab after you close them (and atom), you need to press bookmark icon next to tab name. Once you add the project it auto-saves file structure when you close atom. To add project to project-manager write project-manager save in command palette. To list all projects from project manager press shift-alt-P.

Code editor with multiple categories of opened tabbed files?

Hi can anyone recommend a good, and ideally free editor that will allow me to group opened files based on a module or component I'm working on?
I'm learning joomla so I need one with php,JavaScript,HTML.
I'm currently using dreamweaver. It's great but I hate having to traverse through the file tabs which are usually hidden because I have so many files opened at once. I would ideally want something that will allow me to group these opened files almost like a folder structure where I can create a category for grouping the opened files together so as keep things that are related to one another close by.
Failing this please recommend what is the best approach when dealing with lots and lots of opened files.
I like how browser works because it allows me to open multiple instances and let me group the sites I want via tabs to each browser instance. Dreamweaver won't allow more than one instance. Is there anything out there that can do this?
UltraEdit gives tab a different color depending on the filetype - CSS are green, Javascript are orange, etc. I find this very useful. It also allows the tabs to spill over to several rows, instead of forcing them to one line like Dreamweaver.
If you do have to use Dreamweaver, you can use the file directory panel to traverse the folders on your hard disk. Double-click on a file in a subdirectory to open it, or switch to its tab if it is already open. The file directory panel is on the top-right by default, I think.

Transferring Intellij Live Templates Between Machines

I'm trying to figure out how to transfer the templates in the /.IdeaC10/config/templates/user.xml file to my coworker's machines.
If I copy into the user.xml file, then those changes seem to be getting squashed by Intellij, reverting to the old file contents.
Anyone know how to work around this?
EDIT:
Is there any way to do this by copying and pasting the xml? That would be preferrable...!
Use File | Imprort/Export Settings.
An improved and easier way
This allows you to share them easily between collegues.
You can select multiple live templates and then copy them (right click and select copy, or ctrl+c). This gives you XML-descriptions in your clipboard you can send to others.
Other can then take that XML, and paste it into a "Template Group". Right click one of the groups and select Paste. If the option is greyed out, you didn't select a group but something else.
If you have Settings Repository set you may find your Live Templates stored in
<your_user_home_directory>\
.IntelliJIdea<version>\
config\
settingsRepository\
repository\
templates
the technique of copying and pasting the xml file on another computer in the correct directory, function perfectly for me! But the name of my template file is android.xml for my Android developments. Maybe the file name "user" is protected. Try maybe with a different file name
You need to create the required custom template groups and update the relevant predefined groups as necessary and click OK. Based on these changes, IntelliJ IDEA generates the <group_name>.xml files, see Location of Custom Live Templates Definitions above.
Depending on the operating system you are using, the .xml files are stored at the following locations:
Windows: <your_user_home_directory>.IntelliJ IDEA<version_number>\config\templates
Linux: ~IntelliJ IDEA<version>\config\templates
OS X: ~/Library/Preferences/IntelliJ IDEA<version>/templates
Refer to Intellij Help article.

Are Objective-C function names stored in text?

I don't remember where I heard about it, (I think I was searching up on how selectors worked and it ended up not being exactly the same as a callback function) and I can't confirm it. But more importantly than that, is there a way I could get a list of the function names from another application?
See class-dump.
You can sometimes see a list of the method names in an application. Find the .ipa file for the app (possibly in the Music->iTunes->Mobile Applications directory on a Mac). Make a copy of one of the ipa files and change it from .ipa to .zip. Unzip the file and in the Payload folder, there's a file with the same name as the app. Right click on it and "Show Package Contents". In there, you'll find another file with the same name as the app (with no extension). This is the executable file for the app. If you open it in a text editor like BBEdit, you'll sometimes be able to see some method names, as well as a list of the frameworks the app is built against. You can find the path name where things were kept too, often with the developer's name.
For example, looking into the Japanese dicitonary Daijirin, I can see these methods:
-[HMWebSupport openMONOKAKIDOSupportWithSafariForView:style:]
-[HistoryViewController viewWillAppear:]
I can also see that one of the developers was called Norihito, and he was using SVN: /Users/norihito/Developer/SVN/Mobile/DAIJIRIN/Other
Other applications (like Weightbot) don't show as much information. I don't know the reason it shows up some times and doesn't other times.