【发布时间】:2011-05-26 03:22:47
【问题描述】:
在我的 .vimrc 文件中,我有一个用于注释的键绑定,它在行首插入双斜杠 (//):
" the mappings below are for commenting blocks of text
:map <C-G> :s/^/\/\//<Esc><Esc>
:map <C-T> :s/\/\/// <Esc><Esc>
但是,当我编辑 Python 脚本时,我想将其更改为 cmets 的 # 符号
我的.vim/ftdetect 文件夹中有一个Python.vim 文件,其中还包含选项卡宽度等设置。
如果可能的话,覆盖键绑定的代码是什么,以便我使用 Python:
" the mappings below are for commenting blocks of text
:map <C-G> :s/^/#/<Esc><Esc>
:map <C-T> :s/#/ <Esc><Esc>
【问题讨论】:
标签: vim