自定义python edi

2024-04-26 11:10:01 发布

您现在位置:Python中文网/ 问答频道 /正文

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

有没有类似类型的编辑器已经存在,我可以建立一些东西? 我能开发这样的编辑器吗?如果是,怎么做?你知道吗


Tags: 模块文件函数数据库类型编辑器建议编写程序
3条回答

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

:h ins-completion

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

可完成以下工作:

  1. 整行| i|u CTRL-X|u CTRL-L |
  2. 当前文件中的关键字| i|u CTRL-X|u CTRL-N |
  3. “字典”中的关键字i|u CTRL-X|u CTRL-K|
  4. “叙词表”中的关键字,叙词表样式| i|u CTRL-X|u CTRL-T|
  5. 当前文件和包含文件中的关键字| i|u CTRL-X|u CTRL-i|
  6. 标签| i|u CTRL-X|u CTRL-]|
  7. 文件名| i|CTRL-X|U CTRL-F |
  8. 定义或宏| i|u CTRL-X|u CTRL-D |
  9. Vim命令行| i|u CTRL-X|u 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,也许这个软件能满足你所有的需要

我建议您为eclipse使用PyDev插件。PyDev有很多东西,可以提高效率。你可以在下面找到:http://www.pydev.org/

致以最诚挚的问候 公元1574年

相关问题 更多 >