tmux and vim to set terminal title
dblume

dblume commited on 2024-04-27 11:54:08
Showing 3 changed files, with 4 additions and 0 deletions.

... ...
@@ -14,6 +14,7 @@ set noruler         " Show coordinates on status line
14 14
 set hidden          " Don't abandon Scratch buffer when hidden.
15 15
 "set cursorline     " For CursorLineNR formatting similar to pre 8.0.
16 16
 set culopt=number   " Otherwise diff views have an underline. neovim issue 9800
17
+set title           " Set the title of the terminal window
17 18
 
18 19
 " Make j and k move to the next row, not file line
19 20
 nnoremap j gj
... ...
@@ -63,6 +63,8 @@ set -g status-right '#[fg=green]%m/%d %H:%M#[default]'
63 63
 setw -g mode-keys vi
64 64
 setw -g automatic-rename off
65 65
 setw -g aggressive-resize
66
+set -g set-titles on
67
+set -g set-titles-string "tmux / #T"
66 68
 #set -g allow-rename on  ## ssh'ed servers may rename window to PS1, duplicating path
67 69
 #setw -g window-status-current-format '#[fg=yellow]#I:#F:#T:.../#{b:pane_current_path}#[default]'
68 70
 setw -g window-status-current-format '#{?#{!=:#{session_windows},1},#I:#W:,}#[fg=yellow]#{?window_zoomed_flag,Z:,}#{s\/home/dblume\~\:pane_current_path}#[default]'
... ...
@@ -16,6 +16,7 @@ set scrolloff=0     " EC2 defaults to 5. Set explicitly to be consistent
16 16
 set formatoptions+=j " Delete comment character when joining commented lines.
17 17
 set ttimeoutlen=100 " Affects Esc key, not leader.
18 18
 set noruler         " Don't show cursor pos on right side of status bar
19
+set title           " Set the title in the terminal window
19 20
 
20 21
 if v:version >= 703
21 22
   " Do save the undo tree to file, but not in the local directory.
22 23