Mapping using Let in Autocmd

2006-07-13 Thread JD Miller
Comment out a line by inserting # then move to the lower line map F10 i# Eschj Here I try to do the same thing but use the BufEnter event to make the comment character change depending on the file type (*.asp). let comment_char=# autocmd BufEnter *.asp let comment_char=' execute map F10 i

Re: Mapping using Let in Autocmd

2006-07-13 Thread JD Miller
Thanks much Hari, I added a space before the Esc and your method works nicely. map F1 iC-R=comment_charCR Eschj Jim -- View this message in context: http://www.nabble.com/Mapping-using-Let-in-Autocmd-tf1938850.html#a5318140 Sent from the Vim - General forum at Nabble.com.