From d6c4e00e60d75c873b708d65274d19c51f3d3746 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 31 Jan 2017 23:27:21 -0800 Subject: [PATCH] [vim] Write current document to Apple Terminal titlebar --- vimrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vimrc b/vimrc index e5e62b2..35331ac 100644 --- a/vimrc +++ b/vimrc @@ -166,6 +166,15 @@ set tags+=~/.tags/usr.tags " included all the time... "set tags+=~/.tags/usr_local.tags +if $TERM_PROGRAM ==# "Apple_Terminal" + set title + " Apple Terminal lets you set the current document with this escape. + set t_ts=]6; + " Alarm character. + set t_fs= + " Write out the full path to the current file in the title string. + set titlestring=file://%{expand('%:p')} +endif " use syntax highlighting if the terminal can support it (or we're in a GUI) if &t_Co > 2 || has('gui_running')