You can get file path in vim with % (percent) symbol. Sometimes you need to run a command with the current file path, for example
git add filepath or
You can add the current file to git with this command in vim:
:!git add %
or you can run any file with this command:
For example, you write a bash script and saved it. But you don't want to close vim or you don't want to go to another terminal screen. Just you need to write
:!%:p and vim run the file for you.
You can run the same command in all active Tmux panes at the same time.
You need to activate command mode in Tmux with Ctrl+B keys and update
synchronize-panes setting to on.
:setw synchronize-panes on
To disable it, set as off.
:setw synchronize-panes off
You can toggle synchronize-panes setting without use on-off parameters.