Re-read your comment, how do you do this at OS level? I can imagine doing this in Vim or Tmux, but OS level for any application?