Skip to content

Commit

Permalink
Added g:vitality_always_assume_iterm option
Browse files Browse the repository at this point in the history
  • Loading branch information
tangledhelix committed May 2, 2012
1 parent 700e289 commit dfbdc2a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
37 changes: 27 additions & 10 deletions doc/vitality.txt
Expand Up @@ -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*
Expand All @@ -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*
Expand All @@ -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*

Expand Down
7 changes: 6 additions & 1 deletion plugin/vitality.vim
Expand Up @@ -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')

" }}}
Expand Down

0 comments on commit dfbdc2a

Please sign in to comment.