For example, define F5 as the compile execution, F7 as the compile, Ctrl-F7 as the run, define F12 as the debug, because F11 is also used in the terminal under Ubuntu.
"Remap F5 to complie the C ++ Program <br/> func compilerun () <br/> EXEC "W" <br/> If & filetype = 'C' <br/> EXEC "! Rm % <"<br/> EXEC "! GCC %-g-o % <"<br/> EXEC "!. /% <"<Br/> elseif & filetype = 'cpp '| & filetype = 'cc' <br/> EXEC" RM % <"<br/> Exec "! C ++ %-g-o % <"<br/> EXEC "!. /% <"<Br/> elseif & filetype = 'java' <br/> EXEC" RM % <"<br/> EXEC "! Javac % "<br/> EXEC "! Java % <"<br/> endif <br/> endfunc <br/> func compile () <br/> EXEC "W" <br/> If & filetype = 'C' <br/> EXEC "! Rm % <"<br/> EXEC "! GCC %-g-wall-o % <"<br/> elseif & filetype = 'cpp '| & filetype = 'cc' <br/> EXEC" RM % <"<br/> EXEC "! C ++ %-g-wall-o % <"<br/> elseif & filetype = 'java' <br/> EXEC" RM % <"<br/> Exec "! Javac % "<br/> endif <br/> endfunc <br/> func run () <br/> EXEC "W" <br/> If & filetype = 'C' <br/> EXEC "!. /% <"<Br/> elseif & filetype = 'cpp '| & filetype = 'cc' <br/> EXEC "!. /% <"<Br/> elseif & filetype = 'java' <br/> EXEC "! Java % <"<br/> endif <br/> endfunc <br/> func debug () <br/> EXEC "W" <br/> If & filetype = 'C' <br/> EXEC "! GDB./% <"<br/> elseif & filetype = 'cpp '| & filetype = 'cc' <br/> EXEC "! GDB. /% <"<br/> endif <br/> endfunc <br/> Map <F5>: Call compilerun () <CR> <br/> Map <F7>: call compile () <CR> <br/> Map <C-F7>: Call run () <CR> <br/> Map <F12>: Call debug () <CR> <br/>