I am writing a package to support filter functionality which will input the filtered file in a new textEditor/buffer. I searched through the api document and it seems to be atom.workspace.buildTextEditor(). But I tried the below code but it doesn’t seem to work for me.
> var newEditor = atom.workspace.buildTextEditor(); > newEditor.insertText("Hello World!");
I can’t find any other method to create buffer/TextEditor in the API doc. Did I miss anything? Or is the text editor created via workspace.buildTextEditor somehow hidden after creation which I need to show in the later code.
Another a bit of off-topic question is, it seems there are some properties missing in the API document. For example, I am using Atom.workspace.getActivePaneItem().buffer.file to get the current file. However, it doesn’t seem to get well documented about this. And getActivePaneItem’s return type is pretty vague in the document. Am I missing something here?