Friday, June 7, 2013

Re: E488 Trailing characters when I call two functions

On Friday, June 7, 2013 12:53:23 PM UTC-5, FlashBurn wrote:
> nnoremap <silent><F7> :call RebuildCscope(g:cscope_files, g:cscope_out, g:src_dirs)<cr> | :call RebuildCtags(g:ctags_files, g:ctags_out, g:src_dirs)<cr>
>

There are a couple problems with this:

1. Map commands don't see | as an argument, that's a way to separate two map commands. E.g. you could do "map <F7> :Foo<CR> | map <F8> :Bar<CR>" to make two separate mappings. To include the | in the mapping itself, use either <Bar> or \|
2. Your mapping is starting from normal mode, doing an entire :call...<CR> command, then doing a | command, then another entire :call...<CR> command. Either you need to drop the | and do :call...<CR>:call...<CR> from normal mode, OR drop the first <CR> and execute two EX commands like :call...\|call...<CR>

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: