" Comment out a line by inserting "# " then move to the lower line map <F10> i# <Esc>hj
" 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" . comment_char . " <Esc>hj" " But the comment_char variable never seems to see the let assignment in the " autocmd statement. What have I missed here? Is there a better approach? " Thank you. -- View this message in context: http://www.nabble.com/Mapping-using-Let-in-Autocmd-tf1938850.html#a5313061 Sent from the Vim - General forum at Nabble.com.