<commit_before>*vitality.txt*   make Vim play nicely with iTerm2 and tmux

    █████ █      ██                       ███
 ██████  █    █████ █       █              ███     █       █
██   █  █       ██████     ██               ██    ███     ██
    █  ██       █ ███      ██               ██     █      ██
   █  ███      █         ████████           ██          ████████
  ██   ██      █  ███   ████████   ████     ██   ███   ████████ ██   ████
  ██   ██      █   ███     ██     █ ███  █  ██    ███     ██     ██    ███  █
  ██   ██     █     ██     ██    █   ████   ██     ██     ██     ██     ████
  ██   ██     █     ██     ██   ██    ██    ██     ██     ██     ██      ██
  ██   ██     █     ██     ██   ██    ██    ██     ██     ██     ██      ██
   ██  ██    █      ██     ██   ██    ██    ██     ██     ██     ██      ██
    ██ █     █      ██     ██   ██    ██    ██     ██     ██     ██      ██
     ███     █      ██     ██   ██    ██    ██     ██     ██     ██      ██
      ███████       ███ █   ██   █████ ██   ███ █  ███ █   ██     █████████
        ███          ███          ███   ██   ███    ███             ████ ███
                                                                          ███
    Vitality makes [V]im play nicely with                          █████   ███
                   [i]Term2 and                                  ████████  ██
                   [t]mux.                                      █      ████

==============================================================================
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|
        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*

Vitality is a Vim plugin designed to restore some sanity to the fairly common
combination of Vim, iTerm2 and (optionally) tmux.

It currently performs two main functions.  First, it makes the |FocusGained|
and |FocusLost| autocommands fire when iTerm2 gains or loses focus.  Yes, even
through tmux.

It also handles setting the cursor to and from a bar when entering and exiting
insert mode.

You shouldn't have to do anything other than install the plugin for all this
to work.

If you encounter bugs, please report them (|VitalityBugs|).  Terminal codes
are a fiddly little rabbit hole, so it's entirely possible that things will
sometimes break.
==============================================================================
2. Configuration                                              *VitalityConfig*

You can tweak the behavior of Vitality by setting a few variables in your
.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*

Set this to 0 if you want to disable normal/insert block/bar cursor switching.

Default: 1

------------------------------------------------------------------------------
2.2 g:vitality_fix_focus                                  *vitality_fix_focus*

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*

You don't need to know this.

You don't WANT to know this.

Turn back now or skip to the |VitalityLicense|.

You've been warned.

------------------------------------------------------------------------------<commit_msg>Update docs to reflect new variables<commit_after>*vitality.txt*   make Vim play nicely with iTerm2 and tmux

    █████ █      ██                       ███
 ██████  █    █████ █       █              ███     █       █
██   █  █       ██████     ██               ██    ███     ██
    █  ██       █ ███      ██               ██     █      ██
   █  ███      █         ████████           ██          ████████
  ██   ██      █  ███   ████████   ████     ██   ███   ████████ ██   ████
  ██   ██      █   ███     ██     █ ███  █  ██    ███     ██     ██    ███  █
  ██   ██     █     ██     ██    █   ████   ██     ██     ██     ██     ████
  ██   ██     █     ██     ██   ██    ██    ██     ██     ██     ██      ██
  ██   ██     █     ██     ██   ██    ██    ██     ██     ██     ██      ██
   ██  ██    █      ██     ██   ██    ██    ██     ██     ██     ██      ██
    ██ █     █      ██     ██   ██    ██    ██     ██     ██     ██      ██
     ███     █      ██     ██   ██    ██    ██     ██     ██     ██      ██
      ███████       ███ █   ██   █████ ██   ███ █  ███ █   ██     █████████
        ███          ███          ███   ██   ███    ███             ████ ███
                                                                          ███
    Vitality makes [V]im play nicely with                          █████   ███
                   [i]Term2 and                                  ████████  ██
                   [t]mux.                                      █      ████

==============================================================================
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|
        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*

Vitality is a Vim plugin designed to restore some sanity to the fairly common
combination of Vim, iTerm2 and (optionally) tmux.

It currently performs two main functions.  First, it makes the |FocusGained|
and |FocusLost| autocommands fire when iTerm2 gains or loses focus.  Yes, even
through tmux.

It also handles setting the cursor to and from a bar when entering and exiting
insert mode.

You shouldn't have to do anything other than install the plugin for all this
to work.

If you encounter bugs, please report them (|VitalityBugs|).  Terminal codes
are a fiddly little rabbit hole, so it's entirely possible that things will
sometimes break.
==============================================================================
2. Configuration                                              *VitalityConfig*

You can tweak the behavior of Vitality by setting a few variables in your
.vimrc file. Currently five options are available: >

    let g:vitality_fix_cursor = 0
    let g:vitality_normal_cursor = 0
    let g:vitality_insert_cursor = 1
    let g:vitality_fix_focus = 0
    let g:vitality_always_assume_iterm = 1

------------------------------------------------------------------------------
2.1 g:vitality_fix_cursor                                *vitality_fix_cursor*

Set this to 0 if you want to disable normal/insert block/bar cursor switching.

Default: 1

------------------------------------------------------------------------------
2.2 g:vitality_normal_cursor                          *vitality_normal_cursor*

Set this to the cursor type you want to have in normal mode. iTerm2 has three
cursor types:

Block = 0
Bar = 1
Underline = 2

Default: 0

------------------------------------------------------------------------------
2.3 g:vitality_insert_cursor                          *vitality_insert_cursor*

Set this to the cursor type you want to have in insert mode. iTerm2 has three
cursor types:

Block = 0
Bar = 1
Underline = 2

Default: 1

------------------------------------------------------------------------------
2.4 g:vitality_fix_focus                                  *vitality_fix_focus*

Set this to 0 if you don't want focus events to be processed.

Default: 1

------------------------------------------------------------------------------
2.5 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*

You don't need to know this.

You don't WANT to know this.

Turn back now or skip to the |VitalityLicense|.

You've been warned.

------------------------------------------------------------------------------
{'fraction_non_alphanumeric': 0.26722222222222225, 'fraction_numerical': 0.007962962962962963, 'mean_word_length': 1.2815800591465991, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4776199', 'n_tokens_mistral': 3173, 'n_tokens_neox': 2679, 'n_words': 1105}