Charles Campbell 写道: >> You can use the escape() function to escape certain characters in a >> string. Your mapping would then become >> >> map <C-B> 0y$:!<C-R>=escape(@0,'#')<cr><cr> >> >> See >> >> :help escape() >> > The shellescape() function was designed for this situation. > > Regards, > Chip Campbell
The shellescape() function will add single quotes to the string, which makes the command unusable, for example: :!echo test should work. :!'echo test' will not run at all. Anyway to disable shellescape() from adding single quotes to the string? Or is it possible to run the string with single quotes? --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
