• 大小: 162KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-06-15
  • 语言: 其他
  • 标签: python  sublimeREPL  

资源简介

sublime text3安装SublimeREPL--解决不能运行input()的问题

资源截图

代码片段和文件信息

from __future__ import absolute_import unicode_literals print_function division

import sublime
import sublime_plugin

    

class SublimeREPLCompletions(sublime_plugin.EventListener):
    def on_query_completions(self view prefix locations):
        try:
            from .sublimerepl import manager
        except ValueError:
            from sublimerepl import manager
            
        if not view.settings().get(“repl“):
            return True

        rv = manager.repl_view(view)
        if not rv:
            return []

        repl = rv.repl
        if not repl.autocomplete_available():
            return []

        line = view.line(locations[0])

        start = max(line.begin() rv._output_end)
        end = line.end()

        whole_line = view.substr(sublime.Region(start end))
        pos_in_line = locations[0] - start
        whole_prefix = whole_line[:pos_in_line]

        completions = repl.autocomplete_completions(
            whole_line=whole_line
            pos_in_line=pos_in_line
            prefix=prefix
            whole_prefix=whole_prefix
            locations=locations)
        return completions sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件          23  2016-09-24 03:05  .gitignore
     文件          35  2016-09-24 03:05  .hgignore
     文件           1  2016-09-24 03:05  .no-sublime-package
     文件        1224  2016-09-24 03:05  completions.py
     目录           0  2016-09-24 03:05  config\
     目录           0  2016-09-24 03:05  config\Clojure\
     目录           0  2016-09-24 03:05  config\Clojurescript\
     文件         602  2016-09-24 03:05  config\Clojurescript\clojurescript.tmLanguage
     文件         506  2016-09-24 03:05  config\Clojurescript\Default.sublime-commands
     文件        2413  2016-09-24 03:05  config\Clojurescript\Main.sublime-menu
     文件         463  2016-09-24 03:05  config\Clojure\Default.sublime-commands
     文件         317  2016-09-24 03:05  config\Clojure\Default.sublime-keymap
     文件        1398  2016-09-24 03:05  config\Clojure\Main.sublime-menu
     目录           0  2016-09-24 03:05  config\Coffeescript\
     文件         241  2016-09-24 03:05  config\Coffeescript\Default.sublime-commands
     文件         843  2016-09-24 03:05  config\Coffeescript\Main.sublime-menu
     目录           0  2016-09-24 03:05  config\CommonLisp\
     文件        1563  2016-09-24 03:05  config\CommonLisp\Default.sublime-commands
     文件        4823  2016-09-24 03:05  config\CommonLisp\Main.sublime-menu
     目录           0  2016-09-24 03:05  config\Elixir\
     文件         222  2016-09-24 03:05  config\Elixir\Default.sublime-commands
     文件         755  2016-09-24 03:05  config\Elixir\Main.sublime-menu
     目录           0  2016-09-24 03:05  config\Erlang\
     文件         222  2016-09-24 03:05  config\Erlang\Default.sublime-commands
     文件         761  2016-09-24 03:05  config\Erlang\Main.sublime-menu
     目录           0  2016-09-24 03:05  config\Execnet\
     文件         243  2016-09-24 03:05  config\Execnet\Default.sublime-commands
     文件         542  2016-09-24 03:05  config\Execnet\Main.sublime-menu
     目录           0  2016-09-24 03:05  config\F\
     文件         209  2016-09-24 03:05  config\F\Default.sublime-commands
     文件         981  2016-09-24 03:05  config\F\Main.sublime-menu
............此处省略142个文件信息

评论

共有 条评论