New answers tagged external-command
2
votes
Vim is creating a .exe file when I run some C++ code. How do I save it to a specific directory?
Your g++ command contains -o %:r; the -o flag for g++ sets the output filename, the % expands to the current buffer name in the Vim commandline, and :r is a modifier to remove any file extension. So ...
Top 50 recent answers are included
Related Tags
external-command × 215command-line × 34
vimscript × 24
shell × 13
bash × 12
vimrc × 11
key-bindings × 11
terminal × 10
microsoft-windows × 10
neovim × 8
ex-mode × 8
autocmd × 7
buffers × 6
filetype-tex × 6
register × 6
gvim × 5
filter × 5
search × 4
functions × 4
linux × 4
save × 4
filesystem × 4
indentation × 3
vim-windows × 3
visual-mode × 3