0

This does NOT work with files opened in several tabs (put in ~/.vimrc obviously):

noremap <F5> :wa<CR> <bar> :!global_stack_build_run.sh<CR>

Neither it works when I use | instead of <bar>.

It appears to run only :wa.

  • 2
    Are you sure this does not work? According to the documentation :help map_bar using <bar> should work. A simple mapping did just work. Try removing the <cr> from your mapping and see if it will be put into the command line – Christian Brabandt Oct 24 '18 at 20:10
  • @ChristianBrabandt Thank you! Indeed removing <cr> after wa: worked: noremap <F5> :wa <bar> :!global_stack_build_run.sh<CR>. Consider it an answer. – LetMeSOThat4U Oct 24 '18 at 20:13
  • 1
    You dont’t need the second colon in the version in your comment – D. Ben Knoble Oct 24 '18 at 23:15
  • @ChristianBrabandt, if you care, you can copy your comment into the answer and I'll accept it. – LetMeSOThat4U Oct 26 '18 at 10:20
1

According to the documentation :help map_bar using should work. A simple mapping I tried did just work. So try removing the <cr> from your mapping and see if it will be put into the command line

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.