在我.vimrc
文件我有一個鍵之前線你可以在Vim中有文件類型特定的鍵綁定嗎?
" the mappings below are for commenting blocks of text
:map <C-G> :s/^/\/\//<Esc><Esc>
:map <C-T> :s/\/\/// <Esc><Esc>
但是插入雙斜線(//
),當我編輯的Python腳本我想改變這種狀況到#
標誌徵求意見
我有一個Python.vim
文件在我.vim/ftdetect
文件夾中也有tabwidths等 設置什麼是覆蓋鍵綁定代碼如果可能的話,所以我使用的Python:
" the mappings below are for commenting blocks of text
:map <C-G> :s/^/#/<Esc><Esc>
:map <C-T> :s/#/ <Esc><Esc>
真棒,完美工作! – James 2011-05-26 04:23:28
你忘了''的一部分。 –
2011-05-26 08:43:35
是的..它就是這樣。謝謝 – freitass 2011-05-26 10:32:10