【问题标题】:Custom python editor自定义python编辑器
【发布时间】:2016-10-18 10:14:38
【问题描述】:

我正在寻找这样的 python 编辑器,它们在编写程序期间使用自定义模块和函数时建议输入(在文件/数据库中提到)。

是否已经有类似类型的编辑器可供我构建? 我可以开发这样的编辑器吗?如果是,怎么做?

【问题讨论】:

标签: python editor


【解决方案1】:

试试 PyCharm,或许这个软件能满足你的所有需求

【讨论】:

    【解决方案2】:

    我建议您使用 Eclipse 的 PyDev 插件。 PyDev 有很多东西,可以提高效率。您可以在以下位置找到它:http://www.pydev.org/

    最好的问候 1574ad6

    【讨论】:

    • 我已经尝试过 PyDev 但它可以用来与数据库同步吗?
    • 代码通常位于文件或存储库中,例如 subversion、github、团队基础服务器……支持文件和代码存储库。
    【解决方案3】:

    您可以通过在 ~/.vimrc 文件中包含这一行来使用 vim 编辑器。

    :h ins-completion
    

    现在您可以使用下面的键盘快捷键为您的自定义功能实现自动完成功能。

    可以完成:

    1. 整行|i_CTRL-X_CTRL-L|
    2. 当前文件中的关键字|i_CTRL-X_CTRL-N|
    3. “字典”中的关键字|i_CTRL-X_CTRL-K|
    4. “同义词库”中的关键字,同义词库样式|i_CTRL-X_CTRL-T|
    5. 当前和包含文件中的关键字|i_CTRL-X_CTRL-I|
    6. 标签|i_CTRL-X_CTRL-]|
    7. 文件名|i_CTRL-X_CTRL-F|
    8. 定义或宏|i_CTRL-X_CTRL-D|
    9. Vim 命令行 |i_CTRL-X_CTRL-V|

    如果您想学习 vim 基础知识,请使用此链接:Vim Basics

    您可以使用这个 .vimrc 文件进行 python 开发:

    set title
    autocmd FileType python set expandtab ts=4 sw=4
    
    "autocmd FileType python set sw=4
    "autocmd FileType python set sts=4
    "autocmd FileType python set ts=4
    " enable syntax highlighting
    "autocmd FileType python syntax enable
    " show line numbers
    " set numbe
    
    " set tabs to have 4 spaces
    " autocmd FileType python set ts=4
    
    " indent when moving to the next line while writing code
    "set autoindent
    
    " expand tabs into spaces
    "autocmd FileType python set expandtab
    
    " when using the >> or << commands, shift lines by 4 spaces
    "autocmd FileType python set shiftwidth=4
    
    " show a visual line under the cursor's current line
    " set cursorline
    
    " show the matching part of the pair for [] {} and ()
    set showmatch
    
    " enable all Python syntax highlighting features
    autocmd FileType python let python_highlight_all = 1
    
    " to change the default colour of the string to white.
    highlight String guifg=1 guibg=11
    :h ins-completion
    

    【讨论】:

    • 你为什么投了反对票?它工作得很好,而且 pycharm 的完整版不是免费的,它也不是编辑器和 IDE。
    • 感谢@KevinAartsen
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-27
    • 2012-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多