In my .vimrc file, I have a key binding for comments that insert double slashes ( // ) before the line
" the mappings below are for commenting blocks of text :map <CG> :s/^/\/\//<Esc><Esc> :map <CT> :s/\/\/// <Esc><Esc>
However, when I edit Python scripts, I want to change this to a # sign for comments
I have a Python.vim file in my .vim/ftdetect , which also has settings for tabs, etc. What is the code to override key bindings, if possible, so I use Python:
" the mappings below are for commenting blocks of text :map <CG> :s/^/#/<Esc><Esc> :map <CT> :s/#/ <Esc><Esc>
vim
James May 26 '11 at 3:22 a.m. 2011-05-26 03:22
source share