공부/툴
[SublimeText] reverse text plugin
승가비
2020. 12. 10. 11:23
728x90
Tools > Developer > New Plugin...
import sublime
import sublime_plugin
class ReverseCommand(sublime_plugin.TextCommand):
def run(self, edit):
for region in self.view.sel():
stringContents = self.view.substr(region)
self.view.replace(edit, region, stringContents[::-1])
View > Show Console
view.run_command("reverse")
https://stackoverflow.com/questions/28966185/reverse-all-line-of-text-in-sublime-text
Reverse all line of text in Sublime Text
I have a file where I have multiple lines. Is there an option in Sublime Text 3 to reverse whole line ? Like ABCDEFG to GFEDCBA
stackoverflow.com
728x90