From ce1e13e2c9782dc4c11478092744e49e3459b77a Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 13 Jul 2024 23:16:42 +0200 Subject: [PATCH] use plugin nvim-autopairs for autopair delimitMate is not updated for a long time. --- README.md | 2 +- after/ftplugin/cpp.vim | 3 --- after/ftplugin/lua.vim | 3 --- after/ftplugin/python.vim | 3 --- lua/plugin_specs.lua | 6 +++++- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1043824..7116a59 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ and how to set up on different platforms (Linux, macOS, and Windows). + Better escaping from insert mode via [better-escape.vim](https://github.com/nvim-zh/better-escape.vim). + Ultra-fast project-wide fuzzy searching via [LeaderF](https://github.com/Yggdroot/LeaderF). + Faster code commenting via [vim-commentary](https://github.com/tpope/vim-commentary). -+ Faster matching pair insertion and jump via [delimitMate](https://github.com/Raimondi/delimitMate). ++ Faster matching pair insertion and jump via [nvim-autopairs](https://github.com/windwp/nvim-autopairs). + Smarter and faster matching pair management (add, replace or delete) via [vim-sandwich](https://github.com/machakann/vim-sandwich). + Fast buffer jump via [hop.nvim](https://github.com/phaazon/hop.nvim). + Powerful snippet insertion via [Ultisnips](https://github.com/SirVer/ultisnips). diff --git a/after/ftplugin/cpp.vim b/after/ftplugin/cpp.vim index a8f76f3..2e1cde0 100644 --- a/after/ftplugin/cpp.vim +++ b/after/ftplugin/cpp.vim @@ -34,6 +34,3 @@ function s:create_term_buf(_type, size) abort endif execute 'resize ' . a:size endfunction - -" For delimitMate -let b:delimitMate_matchpairs = "(:),[:],{:}" diff --git a/after/ftplugin/lua.vim b/after/ftplugin/lua.vim index 6fdbc66..910c31d 100644 --- a/after/ftplugin/lua.vim +++ b/after/ftplugin/lua.vim @@ -4,9 +4,6 @@ set formatoptions-=r nnoremap :luafile % -" For delimitMate -let b:delimitMate_matchpairs = "(:),[:],{:}" - " Use nvim-treesitter for folding set foldmethod=expr set foldexpr=nvim_treesitter#foldexpr() diff --git a/after/ftplugin/python.vim b/after/ftplugin/python.vim index 71e31c0..a9f625c 100644 --- a/after/ftplugin/python.vim +++ b/after/ftplugin/python.vim @@ -13,9 +13,6 @@ set softtabstop=4 " number of spaces in tab when editing set shiftwidth=4 " number of spaces to use for autoindent set expandtab " expand tab to spaces so that tabs are spaces -" For delimitMate -let b:delimitMate_matchpairs = "(:),[:],{:}" - " Use nvim-treesitter for folding set foldmethod=expr set foldexpr=nvim_treesitter#foldexpr() diff --git a/lua/plugin_specs.lua b/lua/plugin_specs.lua index cfda259..f18dda4 100644 --- a/lua/plugin_specs.lua +++ b/lua/plugin_specs.lua @@ -221,7 +221,11 @@ local plugin_specs = { }, event = "InsertEnter" }, -- Automatic insertion and deletion of a pair of characters - { "Raimondi/delimitMate", event = "InsertEnter" }, + { + 'windwp/nvim-autopairs', + event = "InsertEnter", + config = true + }, -- Comment plugin { "tpope/vim-commentary", event = "VeryLazy" },