* Try to avoid overriding options set in user vimrc.
* Provide :DiffOrig, as found in the example at `:help :DiffOrig`.
* Enable Vim's included :Man command.
* Enable g:is_posix, for better highlighting of sh filetype.
* Break undo with <C-G>u before delete word with <C-W>.
* Add `set viewoptions-=options`.
* Add `set display+=truncate`.
* Add `set nolangremap`.
* Add `set nocompatible`.
* Replace `set sidescrolloff=5` with `set sidescroll=1 sidescrolloff=2`.
* Remove `set autoindent`.
* Remove conditional `set encoding=utf-8`.
* Don't run `filetype plugin indent on` a second time.
While `:runtime plugin/sensible.vim` does allow for effectively
superseding any option set by sensible.vim, it has never sat right with
me that this was necessary. This change attempt to use the output of
`:verbose set` to determine if an option should be overridden or not.
Excluded from this change is options we alter, rather than override,
since a user could conceivably have their own alterations that do not
conflict with sensible.vim. If any of these alterations were to receive
pushback, I would reconsider this decision.
References: https://github.com/tpope/vim-sensible/issues/129
References: https://github.com/tpope/vim-sensible/issues/88
This seems like a weirdly specific thing to provide in a set of
defaults, but since defaults.vim provides it I guess we can too.
References: https://github.com/tpope/vim-sensible/issues/86
This matches what defaults.vim does. We could omit "lastline" in this
case, but it doesn't hurt anything, and keeping it out of an if
statement allows it to be set without +eval.
Vim 8.2.2912 changes the default on Windows, eliminating the primary
issue this was intended to fix. Changing 'encoding' can prevent
previously defined maps from working, so let's rip this out sooner
rather than later.
References: https://github.com/tpope/vim-sensible/issues/69
It's only very rarely that I want this off, but since file type plugins
tend to turn it on when it's desirable, the argument for forcing it
globally is pretty weak.
* Enable upwards tags file searching with `./tags;` in 'tags'.
* Enable joining commented lines with `formatoptions` j flag.
* Remove 'showcmd', 'shiftround', and 'fileformat' changes.
* Allow fish as 'shell' for compatible Vim versions.
* Don't override user specified 'ttimeoutlen'.
* Don't force `t_Co` to 16 for Eterm.
* Add :diffupdate to CTRL-L map.
As of 7.4.276, Vim understands how to run commands in subshells when
'shell' is fish. This fixes the most common problems with running
external commands from Vim.
Plugins may still need to accommodate for fish, but fixing the cognitive
dissonance of having the user's shell changed outweighs the benefit to
lazy plugin writers.
The shiftround setting breaks many common cases of multi-line indent and
outdent for continuation lines. For example, suppose I have the
following code, in a buffer with 8-space indentation:
foo(x,
y)
With the default settings, I can > those two lines, and end up with this:
foo(x,
y);
But with shiftround, I instead end up with:
foo(x,
y);
Thus, revert to the vim default of noshiftround.