> About the mappings... > what is the difference between the following? i.e. why does one work > and the other not? > and what would each of them do? (the only difference is the bar so > don't hurt your eyes looking for anything else ;) ) > map <F2> :%s/\r/\r/ge<Bar>%s/\s\+$//e<CR> > map <F2> :%s/\r/\r/ge | %s/\s\+$//e<CR>
Thanks for pointing out the only difference...it's nice not to spend extra time hunting for it. Wish more folks were as kind :) The difference is that in the second one, you're executing two commands: a map, and a substitute. In the first one, you're issuing a mapping that has two sub-part commands in it. Best seen with :map <f2> :%s/foo/bar/ge <bar> echoerr "Executing part 2" :map <f3> :%s/foo/bar/ge | echoerr "Executing part deux" As soon as you hit <enter> on the 2nd one, you'll see the echoerr. On the first one, you'll get the echoerr only when you hit <f2> Hope this helps, -tim --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
