Sublime Forum

How to get complete text contents of active tab?

#1

I’m new to Sublime plug-in development and have read through the API reference, experimented with some simple view methods, but am not sure how to get all the text from the active view besides grabbing it line-by-line. I’d like to grab all the text and either send it to another external command that requires it as a single long string or write the text out to a temporary file that I would then use externally.

Thanks for any direction toward the simplest method,

Russ

0 Likes

#2
view.substr(sublime.Region(0, view.size()))
0 Likes

#3

Thanks for the help wuub. It was so straighforward :blush:

0 Likes

#4

@ wuub. Yep this anwered my question as well. Thanks!

0 Likes