dail8859 / LuaScript

Notepad++ plugin for Lua scripting capabilities
https://dail8859.github.io/LuaScript/
GNU General Public License v2.0
109 stars 23 forks source link

How does one open a file into the second view i.e. 'editor2'? #64

Closed ghost closed 6 years ago

ghost commented 6 years ago

This plugin seems really interesting and I am writing a few scripts to test it out.

I've managed to execute other applications for code linting and clean-up and I would like to load the output file into the second view so that it is side-by-side with the source.

Is there a command for this in LuaScript, to open view 2 and load a file into it?

dail8859 commented 6 years ago

Glad you are finding it useful. What you can do is open the file then move it to the other view. This is the same as running the menu command View > Move/Clone Current Document > Move to Other View

npp:DoOpen("myfile.txt")
npp:MenuCommand(IDM_VIEW_GOTO_ANOTHER_VIEW)
ghost commented 6 years ago

Thanks for the reply, this seems so useful and powerful I missed the part about menu commands. Very cool indeed.