mizlan / vim-and-cp

Some helpful bits and pieces for your vimrc
43 stars 11 forks source link

Compileandrun command is giving the following error #6

Open nikhilreddydev opened 2 years ago

nikhilreddydev commented 2 years ago

IMG_20211212_182814_003.jpg

Command passed to the terminal via termwrapper is also assuming '&&' to be a file or directory. @mizlan @ironsoul0

mizlan commented 2 years ago

Which shell?

nikhilreddydev commented 2 years ago

Running Ubuntu on wsl2, Zsh with no frameworks.

mizlan commented 2 years ago

When you would normally run CompileAndRun, first run :echo expand('%'). That should print out your filename. If you don't see anything at the bottom, this is the problem. You need to have the file saved on disk (although it seems to be in your image, correct me if I'm wrong).

nikhilreddydev commented 2 years ago

It's expanding the filename @mizlan tho.IMG_20211213_103917_285.jpg

I think it's the problem with "&&"(conditional execution). g++ is assuming it as a filename (atleast acc to error in new term window)

nikhilreddydev commented 2 years ago

@mizlan I am also curious to know how that pressing any key to close terminal buffer is working.

I see no mappings in cp.vim file for that. Is that your custom mapping? If so, please tell me how that works.

mizlan commented 2 years ago

No. That's default behavior, if you see [finished] in the buffer name.