nvim-surround
Add/change/delete surrounding delimiter pairs with ease. Written with :heart: in Lua. (by kylechui)
vim-matchup
vim match-up: even better % :facepunch: navigate and highlight matching words :facepunch: modern matchit and matchparen. Supports both vim and neovim + tree-sitter. (by andymass)
nvim-surround | vim-matchup | |
---|---|---|
29 | 37 | |
2,717 | 1,602 | |
- | - | |
7.1 | 6.7 | |
5 days ago | 11 days ago | |
Lua | Vim Script | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
nvim-surround
Posts with mentions or reviews of nvim-surround.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-06-30.
-
An opinionated article about vim
(Neo)vim supports plugins, which make your code editor much better. You need a faster way to comment stuff? Sure, here is nvim-comment. Now you need a better tool to surround text by certain characters? Alright, we also have nvim-surround. And this goes on for almost everything you ever needed. And in the rare case that you can't find a plugin for what you need: Write it yourself! It's very easy to write plugins, as vim and neovim both have a lot of functions that help with writing those.
-
Using Floaterm, what's the best way to toggle between the editor and opened window and maintain the shell session?
So, I've been using floaterm and I like it a lot so far! But my ideal workflow would look like this
-
How to know what is "surrounding" a piece of text
My guess would be to save the current location of the cursor, then iterate through all possible motions you want, i.e. a[, at, etc. After each time your operator marks get updated and you can save those locations, before resetting the cursor position to the original spot. Finally, take the innermost/closest pair of marks to be your selection. That would be my guess at least, I think your question is similar to how aliases are implemented in nvim-surround.
-
Efficient way to delete highlighted text
Thanks! I was using nvim-surround, but I didn't check dit
-
Can I separate `v` and `vi/va` like Helix?
Oh sorry I forgot to add additional context. I already have keymaps that starts with m but not dealing visual mode. For example, I'm using ms, mr, md for nvim-surround. That is why I'm trying to map mi and ma, not just m for entering visual mode.
-
Automatically encapsulate or surround existing code with symbol pair
I'm trying out https://github.com/kylechui/nvim-surround (maybe a Lua port of that same plugin) and it it seems very capable. With some remapped shortcuts I think I can bend it to my will. Thanks!
-
markdowny.nvim
The other plugin that can do this is kylechui/nvim-surround. Not sure how to set it up, though.
-
Vimtex feature or a script for wrapping a word in a latex command?
You could probably use a surround plugin like nvim-surround and then have an ftplugin that uses the buffer_setup function to create a custom surround.
-
ns-textobject.nvim update! Smater, more useful!
require("ns-textobject").setup({}) -- from https://github.com/kylechui/nvim-surround/discussions/53#discussioncomment-3134891 require("nvim-surround").buffer_setup({ surrounds = { ["l"] = { add = function() local clipboard = vim.fn.getreg("+"):gsub("\n", "") return { { "[" }, { "](" .. clipboard .. ")" }, } end, find = "%b[]%b()", delete = "^(%[)().-(%]%b())()$", change = { target = "^()()%b[]%((.-)()%)$", replacement = function() local clipboard = vim.fn.getreg("+"):gsub("\n", "") return { { "" }, { clipboard }, } end, }, }, },
-
NeoVim as IDE
this might actually be a better surround plugin for surround https://github.com/kylechui/nvim-surround
vim-matchup
Posts with mentions or reviews of vim-matchup.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-12-06.
-
Existing non-lua plugins examples
Then you have all the vimscript plugins, most of which work in neovim too--my favorite of these is vim-matchup
-
Should vim-matchup go into neovim core?
It seems like https://github.com/andymass/vim-matchup is a superior version of both of them, at least that's how it's advertized.
-
Help Mapping Keys
Have you tried vim-matchup?
-
Set it and forget it plugins?
andymass/vim-matchup - nicer %
-
What's your solution to move between " "?
Thank you for you answer! This is the best option I've found by far. But some aditional steps need to be done to enable this behavior. It is documented here vim-matchup
-
Looking for some kinda specific plugins for visibility
vim-matchup does both of this things
-
Matching of Bracket Under Cursor Not Working
If you don't wanna deal with matchparen, you could also consider using vim-matchup, which has better performance than matchparen and can match way more tokens and keywords.
-
Do you use the "%" motion? Do you feel it has "quirks"?
vim-matchup improves these motions.and has a lot of nice features.
-
Which vim plugins do not have a lua equivalent yet?
vim-matchup is written in lua, isn't it? https://github.com/andymass/vim-matchup/tree/master/lua
-
TS-Node-Action: Inline Text Folding
https://github.com/andymass/vim-matchup Plus come custom highlight groups
What are some alternatives?
When comparing nvim-surround and vim-matchup you can also consider the following projects:
vim-sandwich - Set of operators and textobjects to search/select/edit sandwiched texts.
todo-comments.nvim - ✅ Highlight, list and search todo comments in your projects
mini.nvim - Library of 35+ independent Lua modules improving overall Neovim (version 0.7 and higher) experience with minimal effort
indent-blankline.nvim - Indent guides for Neovim
lspkind.nvim - vscode-like pictograms for neovim lsp completion items
nvim-treesitter-textobjects
FastFold - Speed up Vim by updating folds only when called-for.
vim-surround - surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease
nvim-treesitter-pairs
nvim-parinfer - parinfer for Neovim
neovim - Vim-fork focused on extensibility and usability
nvim-surround vs vim-sandwich
vim-matchup vs todo-comments.nvim
nvim-surround vs mini.nvim
vim-matchup vs vim-sandwich
nvim-surround vs indent-blankline.nvim
vim-matchup vs lspkind.nvim
nvim-surround vs nvim-treesitter-textobjects
vim-matchup vs FastFold
nvim-surround vs vim-surround
vim-matchup vs nvim-treesitter-pairs
nvim-surround vs nvim-parinfer
vim-matchup vs neovim