【发布时间】:2012-08-11 20:44:47
【问题描述】:
我有一些python代码:
_name = "football.player"
_description = "Football Player"
def age_calc(self, cr, uid, ids, fields, arg, context=None):
当我在 NERD_commenter 中按 ,cc 进行评论时,它看起来像这样:
_name = "football.player"
# _description = "Football Player"
# def age_calc(self, cr, uid, ids, fields, arg, context=None):
但取消注释后,使用,cu 看起来像这样:
_name = "football.player"
_description = "Football Player"
def age_calc(self, cr, uid, ids, fields, arg, context=None):
为什么这个未注释的块看起来移动了 1 个空格,而不是在其原始位置?以及如何解决?
【问题讨论】:
-
因为注释会在开头插入一个哈希。没有什么可修复的。
-
@CatPlusPlus:我认为问题在于“NERD_commenter”在取消注释后似乎做错了。
-
2 Cat Plus Plus。我不明白你。你的意思是什么“哈希”?我想知道为什么当我评论时,它将文本替换为 1 个空格,但是当我取消注释时,NERD 将其替换为 2 个空格
-
我无法通过 nerdcommenter 重现此行为
标签: vim plugins indentation