vim&蟒蛇 [英] vim & python

查看:83
本文介绍了vim&蟒蛇的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好


我有一些关于在vim中使用python脚本的问题和

关于用vim编辑python的问题。

我可以安装带有python脚本支持的vim,但我找不到

docs,示例或有关使用python使用python编写vim脚本的教程

with google。

是否可以启用calltips;用vim编辑python文件

? (顺便说一句,我已经读过某个地方创建了pyalamode

,特别是因为有人想要calltips而不只是在

解释器中,而且还在编辑器中。)FWIW ,VC ++多次使用calltips

。但是,我也无法在

pyalamode中使用这些calltips。所以我很想找到任何编辑器python那个

有调用提示,但我更喜欢它是vim)

我听说过最大的python大师使用vim。 *请*发布一些

截图你的行动 - 一些有趣的事情,比如

- calltips,

- 编辑 - shell互动
- 在编辑器中通过关键字引用手动调用

- 对象浏览器,

- 等等

或者你在使用vim和C编码器一样吗?

解决方案

sb写道:

是否可以启用calltips?用vim编辑python文件时用什么?


我不这么认为。

我听说过最大的蟒蛇大师使用vim。 *请*发布一些你在行动中的截图 - 一些有趣的事情,比如
- calltips,
- editor-shell interaction
- 在编辑器中通过关键字引用手动调用
- 对象浏览器,
-
或者你是否像C编码器一样使用vim?




我正在使用它就像C编码器'',如果这意味着我乐意使用语法

突出显示,自动缩进和行编号,但不是任何东西

else。 br />

请注意,我不是最大的蟒蛇大师之一;-)


Gerrit。


-

天气Twenthe,荷兰01/03 20:25 UTC:

3.0?°C风3.6 m / s W(比NAP高57米)

-

阿斯伯格综合症 - 一种个人方法:
http://people.nl.linux.org/~gerrit/english/


sb< sp ********** @ yahoo.com>写道:

我听说过最大的python大师使用vim。 *请*发布一些你在行动中的截图 - 一些有趣的事情,比如
- calltips,
- editor-shell interaction
- 在编辑器中通过关键字引用手动调用
- 对象浏览器,
-
或者你是否像C编码器一样使用vim?




虽然绝对不是大师我使用vims语法高亮

加上以.py结尾的所有文件的这些设置:


高亮显示评论ctermfg = white


设置smartindent

cinwords = if,elif,else,for,while,try,except,finally,def,class

set tabstop = 4

设置shiftwidth = 4

设置smarttab

设置expandtab

设置softtabstop = 4

设置autoindent


根据你的编码风格你可能想要调整它们,

但它们是指针。他们很可能还有改善空间的空间。


至于calltips,shell互动和所有其他漂亮的东西:

我不会用它。虽然他们有时候听起来很酷但我总是比他们帮助更加恼火。


Greets,

Tobias


-

感谢您拨打


PROVIDER服务台。如果您的杯架被损坏,请按1.如果您需要实际的知识支持

人,请输入/ 28网络掩码的IP表示。

Hello

I have a bunch of questions about using python scripting in vim and
about editing python with vim.
I can install vim with python scripting support, but I can not find
docs, examples or tutorials about scripting vim using python anywhere
with google.
Is it possible to enable "calltips" while editing python documents
with vim? (BTW I''ve read somewhere that pyalamode was created
specifically because someone wanted "calltips" not just in the
interpreter, but in the editor as well. FWIW, VC++ has had calltips
for many years. However, I can not get those calltips to work in
pyalamode either. So I''m anxious to find any editor for python that
has calltips, but I would prefer it to be vim though)
I''ve heard the biggest python gurus use vim. *Please* post some
screenshots of you in action - some interesting things like
- calltips,
- editor-shell interaction
- reference manual invocation by keyword from within the editor
- object browser,
- etc.
Or are you using vim just like C coders do?

解决方案

sb wrote:

Is it possible to enable "calltips" while editing python documents
with vim?
I don''t think so.
I''ve heard the biggest python gurus use vim. *Please* post some
screenshots of you in action - some interesting things like
- calltips,
- editor-shell interaction
- reference manual invocation by keyword from within the editor
- object browser,
- etc.
Or are you using vim just like C coders do?



I''m using it ''like C coders'', if that means that I do happily use syntax
highlighting, auto-indentation and line-numbering, but not anything
else.

Note that I''m not one of the biggest python gurus ;-)

Gerrit.

--
Weather in Twenthe, Netherlands 01/03 20:25 UTC:
3.0?°C wind 3.6 m/s W (57 m above NAP)
--
Asperger''s Syndrome - a personal approach:
http://people.nl.linux.org/~gerrit/english/


sb <sp**********@yahoo.com> wrote:

I''ve heard the biggest python gurus use vim. *Please* post some
screenshots of you in action - some interesting things like
- calltips,
- editor-shell interaction
- reference manual invocation by keyword from within the editor
- object browser,
- etc.
Or are you using vim just like C coders do?



While definitely not being a guru I use vims Syntax highlighting
plus these settings for all files ending in .py:

highlight Comment ctermfg=white

set smartindent
cinwords=if,elif,else,for,while,try,except,finally ,def,class
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set softtabstop=4
set autoindent

Depending on your style of coding you might want to tune them,
but they''re pointers. They most probably have room for
improvement, too.

As for calltips, shell interaction and all the othe nifty stuff:
I don''t use it. And while they sometimes sound cool I always
ended up being more annoyed than helped by them.

Greets,
Tobias

--
Thank you for calling


PROVIDER helpdesk. If your cupholder is
broken, please press 1. If you want an actual knowledgable support
person, please enter the IP representation of a /28 netmask."


这篇关于vim&amp;蟒蛇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆