티스토리 뷰

공부/툴

[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

'공부 > ' 카테고리의 다른 글

Redis-Commander  (0) 2021.01.21
[Confluence] wiki shortcuts  (0) 2021.01.21
[IntelliJ] auto indexing  (0) 2020.11.20
[VSCode] change case  (0) 2020.11.20
[IntelliJ] How to Change Read-Only Status of Files in intellij  (0) 2020.06.26
댓글