Skip to content
Browse files

Added g:vitality_always_assume_iterm option

  • Loading branch information...
1 parent 700e289 commit dfbdc2a086a71fdca7fd63a3f9e4cca0863e49af @tangledhelix tangledhelix committed May 2, 2012
Showing with 33 additions and 11 deletions.
  1. +27 −10 doc/vitality.txt
  2. +6 −1 plugin/vitality.vim
View
37 doc/vitality.txt
@@ -23,15 +23,16 @@
==============================================================================
CONTENTS *vitality-contents*
- 1. Overview and Usage .............. |VitalityOverview|
- 2. Configuration ................... |VitalityConfig|
- 2.1 g:vitality_fix_cursor ...... |vitality_fix_cursor|
- 2.2 g:vitality_fix_focus ....... |vitality_fix_focus|
- 3. How it Works .................... |VitalityHow|
- 4. License ......................... |VitalityLicense|
- 5. Bugs ............................ |VitalityBugs|
- 6. Contributing .................... |VitalityContributing|
- 7. Changelog ....................... |VitalityChangelog|
+ 1. Overview and Usage ................... |VitalityOverview|
+ 2. Configuration ........................ |VitalityConfig|
+ 2.1 g:vitality_fix_cursor ........... |vitality_fix_cursor|
+ 2.2 g:vitality_fix_focus ............ |vitality_fix_focus|
+ 2.3 g:vitality_always_assume_iterm .. |vitality_always_assume_iterm|
+ 3. How it Works ......................... |VitalityHow|
+ 4. License .............................. |VitalityLicense|
+ 5. Bugs ................................. |VitalityBugs|
+ 6. Contributing ......................... |VitalityContributing|
+ 7. Changelog ............................ |VitalityChangelog|
==============================================================================
1. Overview and Usage *VitalityOverview* *VitalityUsage*
@@ -56,10 +57,11 @@ sometimes break.
2. Configuration *VitalityConfig*
You can tweak the behavior of Vitality by setting a few variables in your
-:vimrc file. Currently two options are available: >
+.vimrc file. Currently three options are available: >
let g:vitality_fix_cursor = 0
let g:vitality_fix_focus = 0
+ let g:vitality_always_assume_iterm = 1
------------------------------------------------------------------------------
2.1 g:vitality_fix_cursor *vitality_fix_cursor*
@@ -75,6 +77,21 @@ Set this to 0 if you don't want focus events to be processed.
Default: 1
+------------------------------------------------------------------------------
+2.3 g:vitality_always_assume_iterm *vitality_always_assume_iterm*
+
+By default, Vitality only enables iTerm-specific features when $ITERM_PROFILE
+is present in your environment. However, this value is not preserved once
+you have connected by ssh to another system. If you only use iTerm2, you can
+tell Vim to always assume iTerm features will work.
+
+Set this to 1 if you want Vitality to always assume it is running in iTerm.
+
+Warning: if you set this to true and you run Vim from a terminal other
+than iTerm, it certainly will not work, and you may even get strange output.
+
+Default: depends on the existence of $ITERM_PROFILE.
+
==============================================================================
3. How it Works *VitalityHow*
View
7 plugin/vitality.vim
@@ -24,7 +24,12 @@ if !exists('g:vitality_fix_focus') " {{{
let g:vitality_fix_focus = 1
endif " }}}
-let s:inside_iterm = exists('$ITERM_PROFILE')
+if exists('g:vitality_always_assume_iterm') " {{{
+ let s:inside_iterm = 1
+else
+ let s:inside_iterm = exists('$ITERM_PROFILE')
+endif " }}}
+
let s:inside_tmux = exists('$TMUX')
" }}}

0 comments on commit dfbdc2a

Please sign in to comment.
Something went wrong with that request. Please try again.