mirror of
https://github.com/tmux-plugins/tmux-sensible.git
synced 2024-11-22 07:39:28 +00:00
Deprecate "almost sensible" feature
This commit is contained in:
parent
d2565e5f10
commit
294e607f83
@ -3,6 +3,8 @@
|
|||||||
### master
|
### master
|
||||||
- check before binding `prefix + prefix` (@m1foley)
|
- check before binding `prefix + prefix` (@m1foley)
|
||||||
- enable `focus-events`
|
- enable `focus-events`
|
||||||
|
- deprecate 'almost sensible' feature. The reason for this is to focus the
|
||||||
|
plugin on doing just one thing.
|
||||||
|
|
||||||
### v2.0.0, 2014-10-03
|
### v2.0.0, 2014-10-03
|
||||||
- bugfix: prevent exiting tmux if 'reattach-to-user-namespace' is not installed
|
- bugfix: prevent exiting tmux if 'reattach-to-user-namespace' is not installed
|
||||||
|
29
README.md
29
README.md
@ -4,28 +4,23 @@ A set of tmux options that should be acceptable to everyone.
|
|||||||
|
|
||||||
Inspired by [vim-sensible](https://github.com/tpope/vim-sensible).
|
Inspired by [vim-sensible](https://github.com/tpope/vim-sensible).
|
||||||
|
|
||||||
### Core principles
|
### Principles
|
||||||
|
|
||||||
- core `tmux-sensible` options should be acceptable to **every** tmux user!<br/>
|
- `tmux-sensible` options should be acceptable to **every** tmux user!<br/>
|
||||||
If any option bothers you, please open an issue and it will probably be
|
If any of the options bothers you, please open an issue and it will probably
|
||||||
updated (or removed).
|
be updated (or removed).
|
||||||
- if you think a new option should be added, feel free to open a pull request.
|
- if you think a new option should be added, feel free to open a pull request.
|
||||||
- **no overriding** of user defined settings.<br/>
|
- **no overriding** of user defined settings.<br/>
|
||||||
Your existing `.tmux.conf` settings are respected and they won't be changed.
|
Your existing `.tmux.conf` settings are respected and they won't be changed.
|
||||||
That way you can use `tmux-sensible` if you have a few specific options.
|
That way you can use `tmux-sensible` if you have a few specific options.
|
||||||
|
|
||||||
### Almost sensible principles
|
|
||||||
|
|
||||||
- widely used settings that do not make it into the 'core'
|
|
||||||
- explicitly enabled with `set -g @almost-sensible 'on'`
|
|
||||||
|
|
||||||
### Goals
|
### Goals
|
||||||
|
|
||||||
- group standard tmux community options in one place
|
- group standard tmux community options in one place
|
||||||
- remove clutter from your `.tmux.conf`
|
- remove clutter from your `.tmux.conf`
|
||||||
- educate new tmux users about basic options
|
- educate new tmux users about basic options
|
||||||
|
|
||||||
### Core options
|
### Options
|
||||||
|
|
||||||
# utf8 is on
|
# utf8 is on
|
||||||
set -g utf8 on
|
set -g utf8 on
|
||||||
@ -56,7 +51,7 @@ Inspired by [vim-sensible](https://github.com/tpope/vim-sensible).
|
|||||||
# focus events enabled for terminals that support them
|
# focus events enabled for terminals that support them
|
||||||
set -g focus-events on
|
set -g focus-events on
|
||||||
|
|
||||||
### Core key bindings
|
### Key bindings
|
||||||
|
|
||||||
# easier and faster switching between next/prev window
|
# easier and faster switching between next/prev window
|
||||||
bind C-p previous-window
|
bind C-p previous-window
|
||||||
@ -78,7 +73,13 @@ allowing you to hold `Ctrl` and repeat `a + p`/`a + n` (if your prefix is
|
|||||||
If prefix is `C-b`, above keys will be `C-b` and `b`.<br/>
|
If prefix is `C-b`, above keys will be `C-b` and `b`.<br/>
|
||||||
If prefix is `C-z`, above keys will be `C-z` and `z`... you get the idea.
|
If prefix is `C-z`, above keys will be `C-z` and `z`... you get the idea.
|
||||||
|
|
||||||
### Almost sensible options
|
### Almost sensible options - deprecated
|
||||||
|
|
||||||
|
**Note**: this feature is deprecated and will be removed from `tmux-sensible`
|
||||||
|
in the next major release. The reason for this is to focus this plugin on doing
|
||||||
|
just one thing (and hopefully doing it well).<br/>
|
||||||
|
If you were using 'almost sensible' the path forward is to move all the
|
||||||
|
below options to your `.tmux.conf`.
|
||||||
|
|
||||||
Activate these by putting `set -g @almost-sensible 'on'` in `.tmux.conf`.
|
Activate these by putting `set -g @almost-sensible 'on'` in `.tmux.conf`.
|
||||||
|
|
||||||
@ -95,10 +96,10 @@ Activate these by putting `set -g @almost-sensible 'on'` in `.tmux.conf`.
|
|||||||
|
|
||||||
Add plugin to the list of TPM plugins in `.tmux.conf`:
|
Add plugin to the list of TPM plugins in `.tmux.conf`:
|
||||||
|
|
||||||
set -g @tpm_plugins " \
|
set -g @tpm_plugins ' \
|
||||||
tmux-plugins/tpm \
|
tmux-plugins/tpm \
|
||||||
tmux-plugins/tmux-sensible \
|
tmux-plugins/tmux-sensible \
|
||||||
"
|
'
|
||||||
|
|
||||||
Hit `prefix + I` to fetch the plugin and source it. That's it!
|
Hit `prefix + I` to fetch the plugin and source it. That's it!
|
||||||
|
|
||||||
|
@ -59,6 +59,7 @@ key_binding_not_changed() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# "almost sensible" is deprecated
|
||||||
almost_sensible_on() {
|
almost_sensible_on() {
|
||||||
[ "$(tmux show-option -gvq "$ALMOST_SENSIBLE_OPTION")" == "on" ]
|
[ "$(tmux show-option -gvq "$ALMOST_SENSIBLE_OPTION")" == "on" ]
|
||||||
}
|
}
|
||||||
@ -109,7 +110,7 @@ main() {
|
|||||||
# focus events enabled for terminals that support them
|
# focus events enabled for terminals that support them
|
||||||
tmux set-option -g focus-events on
|
tmux set-option -g focus-events on
|
||||||
|
|
||||||
# ALMOST SENSIBLE OPTIONS
|
# ALMOST SENSIBLE OPTIONS - DEPRECATED
|
||||||
|
|
||||||
if almost_sensible_on; then
|
if almost_sensible_on; then
|
||||||
# C-a should be the Tmux default prefix, really
|
# C-a should be the Tmux default prefix, really
|
||||||
|
Loading…
Reference in New Issue
Block a user