diff --git a/CHANGELOG.md b/CHANGELOG.md index a3d1c87..3157bb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 4.0.3 +`g:AutoPairsVersion = 40003` + +## Fixed +* Made `g:AutoPairsExperimentalAutocmd` actually reflect the new default-enabled state + # 4.0.2 `g:AutoPairsVersion = 40002` diff --git a/README.md b/README.md index fdc3d6a..12b3150 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,25 @@ Insert or delete brackets, parens, and quotes in pair: a maintained fork of [jiangmiao/auto-pairs](https://github.com/jiangmiao/auto-pairs) -## Note to migrating users +## Nvim warning +Note that this is **not** (yet) a statement saying nvim is unsupported. It continues having support - as long as it doesn't break built-in vimscript features. If this breaking continues, nvim will lose support when enough core features break. + +--- + +This plugin is first and foremost a Vim plugin. Nvim support is only maintained by nvim being compatible with vim in the ways that matter - that being in the well-established vimscript functions powering the plugin. + +At the time of writing of this warning, there are two major bugs introduced by nvim incompatibility with elementary and well-established Vimscript functions. One of these bugs were fixed and later regressed. The other was reported [over a year ago at the time of writing,](https://github.com/neovim/neovim/issues/23666), which builds on a [doc bug report](https://github.com/neovim/neovim/issues/22399) written 1.5 years ago, and remains untouched in spite of being significant for plugin support. + +The timeline on the regression is still unclear, but it isn't important. This is a symptom of nvim no longer maintaining compatibility with core vim features. + +If you want to use this plugin with nvim, note that there can and will be bugs caused by Nvim introducing incompatibilities into well-established functions - both intentionally and accidentally. If these are breaking for your use, you can: + +1. Upgrade to Vim +2. Switch to an nvim-specific plugin + +Nvim is no longer a drop-in replacement for Vim, and hasn't been for quite some time. This forces a split in the Nvim and Vim plugin ecosystems as well. This is purely Nvim's fault - not for adding new features on top of Vim, but for breaking long-standing, built-in vimscript functions that have been around longer than nvim has existed. + -If you're migrating from jiangmiao's version, it's highly recommended that you read `:h autopairs-migrating` after installing. There have been a number of breaking changes made in this fork, as well as changes to default behavior. See the migration guide for important differences that are may affect your workflow. ## Installation @@ -28,6 +44,10 @@ Plug 'LunarWatcher/auto-pairs', {'branch': 'develop'} **Note:** As of 4.0.0, `let g:AutoPairsCompatibleMaps = 0` is the default. Set the variable to 1 to use jiangmiao-compatible keybinds. +### Note to migrating users + +If you're migrating from jiangmiao's version, it's highly recommended that you read `:h autopairs-migrating` after installing. There have been a number of breaking changes made in this fork, as well as changes to default behavior. See the migration guide for important differences that are may affect your workflow. + ## Running tests (not required) Auto-pairs comes with a few tests aimed at making sure nothing accidentally regresses without manually testing everything. Tests are in the test folder, and are in the vimspec format (using [themis.vim](https://github.com/thinca/vim-themis)); follow its instructions to run the tests. diff --git a/autoload/autopairs.vim b/autoload/autopairs.vim index 9514e2b..2f72001 100644 --- a/autoload/autopairs.vim +++ b/autoload/autopairs.vim @@ -18,7 +18,7 @@ endif " meant as a number associated with the version. Semantic meaning on the first " digit will take place. See the documentation for more details. -let g:AutoPairsVersion = 40002 +let g:AutoPairsVersion = 40003 let s:save_cpo = &cpoptions set cpoptions&vim diff --git a/plugin/autopairs.vim b/plugin/autopairs.vim index 3b823d5..42edc1f 100644 --- a/plugin/autopairs.vim +++ b/plugin/autopairs.vim @@ -14,7 +14,7 @@ endif let g:AutoPairsLoaded = 1 -if exists('g:AutoPairsExperimentalAutocmd') && g:AutoPairsExperimentalAutocmd +if !exists('g:AutoPairsExperimentalAutocmd') || g:AutoPairsExperimentalAutocmd au BufWinEnter * :call autopairs#AutoPairsTryInit() else au BufEnter * :call autopairs#AutoPairsTryInit()