duanluangua8850
duanluangua8850
2016-12-15 18:34

是否有像ptpython这样的golang解释器和自动完成工具? [关闭]

  • IT行业问题
  • 计算机技术
  • it技术
  • 编程语言问答
  • 互联网问答
已采纳

I'm new to Golang, I want to learn by practicing Golang codes in my shell, is there an interpreter and auto-complete tool like ptpython for golang?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

2条回答

  • doupu7651 doupu7651 5年前

    There isn't an interpreter (it's a compiled language) or REPL for Go, but there is the go playground https://play.golang.org/ for trying out code.

    And for autocomplete, there is a variety of tools out there depending on your editor; I use emacs:

    M-x package install go-autocomplete:

    (ac-config-default)
    (require 'auto-complete-config)
    (require 'go-autocomplete)
    

    If you want a REPL and/with autocomplete, the best I can point you towards is an extension for the go play ground (if you using chrome): Better Go Playground

    It advertises:

    • Golang syntax highlighting
    • Replaces the built in with the Ace editor
    • Mark lines with syntax errors when running your code
    • Auto-completion + Snippets
    • Auto-save to local storage
    • Dark/Light theme toggle

    all in a REPL like environment (you can't do networking stuff though)

    点赞 评论 复制链接分享
  • dtmbc1606 dtmbc1606 5年前

    If you are using vim:

    Please check this out :

    vim-go, gocode and gotools

    vim-go docs

    点赞 评论 复制链接分享

为你推荐