I didn't know it is possible to enable vim mode, in bash before. I learned today and this feature is awesome.

You can enable vim mode in the bash with only change a parameter in your .bashrc file, like that.

set -o vi

That's it. You can use bash with vim strokes.

#tips #vim #en #bash

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 sh filepath.

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.

#tips #en #vim #git

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.

:setw synchronize-panes

#tmux #tips