I am using gvim 9.0.1047 on Windows 10
I added the following to my vimrc so I can run the sas program I am working on and open the log file without leaving vim:
map <F12> :!"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" % -CONFIG "C:\Program Files\SASHome\SASFoundation\9.4\nls\en\SASV9.CFG" -nosplash -icon -log %<.log -print %<.lst<CR> & :e %<.log<CR>
It works fine, but it puts a hash (#) in the program at the front of the line where the cursor lies when I hit f12
I can't understand why. Thanks for any help
EDIT: I saw the same problem with simpler mapping eg,
map <F8> :set guifont=Consolas:h12:cANSI:qDRAFT<CR> & :set numberwidth=2<CR>
ie this also produces the #. At the bottom here: https://vim.fandom.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_2), they suggest this should be
map <F8> :set guifont=Consolas:h12:cANSI:qDRAFT<CR> \| set numberwidth=2<CR>
this solves it ie no # appears, but the second setting is not implemented when i write it like this. I wonder how to get any mapping like this where you want to do 2 things, in the above case i want to reduce the font size and narrow the left margin (to get the output to fit on the screen)