tpope/vim-surround
View on GitHub ↗ ★ 14,107 Vim Script
surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease
29 mentions on Hacker News by 27 people: 1 story, 28 comments · first 2010-07-04 · latest 2025-07-04
20082026
-
But there have been sensible bindings for doing this forever, e.g.: https://github.com/tpope/vim-surround There's no need to break normal editing behavior.
comment by pxc · 2025-07-04 · in The Rise of Whatever -
…to add or change anything around the selection tpope has solved that with vim-surround[1]. [1]: https://github.com/tpope/vim-surround
comment by worksonmine · 2024-03-22 · in Difftastic, a structural diff tool that understands syntax -
…and access editing plugins[2][3] that way. 1. https://github.com/vscode-neovim/vscode-neovim 2. https://github.com/tpope/vim-surround 3. https://github.com/andymass/vim-matchup
comment by turboponyy · 2023-08-14 · in The complex simplicity of my static websites -
▲ 2
Surround.vim: Delete/change/add parentheses/quotes/XML-tags with ease (2022)story by nequo · 2023-08-07 · 0 comments
-
Vim can do this with the following plugin: https://github.com/tpope/vim-surround I exclusively use the visual mode commands though, because I find the normal-mode commands confusing.
comment by tomsmeding · 2023-01-23 · in Ask HN: Text Editor with “add prefix/suffix around selected text” feature? -
…I can barely hold nervous laughter at some hilariously complex refactoring I did. A few links: https://github.com/tpope/vim-surround https://github.com/vim-scripts/argtextobj.vim https://github.com/michaeljsmith/vim-indent-object…
comment by lloeki · 2022-12-13 · in Ask HN: Is Vim still worth learning? -
Surround is a plugin which adds more text objects: https://github.com/tpope/vim-surround cs"': change surrounding quotes, e.g. "foo" -> 'foo' cs([: change surrounding brackets, e.g. (foo) -> [ foo ] ( cs]) would omit the spaces) ci":…
comment by tomn · 2022-12-13 · in Ask HN: Is Vim still worth learning? -
I use vim-surround. https://github.com/tpope/vim-surround
comment by ludsan · 2021-02-27 · in A Vim Guide for Advanced Users -
This is vim-surround by tpope[1]. It does way more than just basic brackets! [1]: https://github.com/tpope/vim-surround
comment by wraithy · 2021-01-21 · in Show HN: I built an online interactive course that helps you learn Vim faster -
ysiwb yank-surround-in-word-brackets also does it. If you have https://github.com/tpope/vim-surround/ installed.
comment by mellavora · 2021-01-20 · in Show HN: I built an online interactive course that helps you learn Vim faster -
https://github.com/tpope/vim-surround
comment by benjaminogles · 2021-01-20 · in Show HN: I built an online interactive course that helps you learn Vim faster -
…have everything Vim does, but it does have Tim Pope's almighty surround plugin, out-of-the-box. https://github.com/tpope/vim-surround ys2w) will put brackets around the next 2 words. That is a beautiful thing.
comment by rendall · 2020-11-12 · in I Still Use Vim -
…https://github.com/tpope/vim-sleuth https://github.com/tpope/vim-repeat https://github.com/tpope/vim-surround https://github.com/junegunn/fzf.vim (also see https://jesseleite.com/posts/2/its-dangerous-to-vim-alone-ta... ) Some sni
comment by oftenwrong · 2019-11-13 · in Ask HN: Share your .vimrc file and what plug-ins you use -
…who wrote vim-fugitive. It is also available non the vim plugin for VSCode by turning on a setting. https://github.com/tpope/vim-surround
comment by mplanchard · 2019-10-12 · in Relearning to Type -
…https://github.com/tpope/vim-commentary - vim-surround: Easily surround selected text with symbols: https://github.com/tpope/vim-surround - vim-unimpared: Adds bindings for some misc. commands, like enabling relative line numbers and…
comment by aquova · 2018-06-30 · in Vim plugins I use -
Isn't this part of vim-surround? http://github.com/tpope/vim-surround
comment by LyndsySimon · 2018-05-21 · in Ten Years of Vim -
And https://github.com/tpope/vim-surround
comment by dmix · 2017-10-20 · in Vim after 15 Years -
…things that, once you've used it for a while, it's impossible to think of editing text without it: https://github.com/tpope/vim-surround
comment by fiddlerwoaroof · 2017-03-16 · in Programs that have saved me 100+ hours -
…nmap s ysi nmap S ysa nmap s$ ys$ nmap sv gvs [0] https://github.com/easymotion/vim-easymotion [1] https://github.com/tpope/vim-surround
comment by grayrest · 2016-10-26 · in Ask HN: What cool development languages/tools changed your career? -
package manager: https://github.com/VundleVim/Vundle.vim surround: https://github.com/tpope/vim-surround repeat: http://www.vim.org/scripts/script.php?script_id=2136 git: https://github.com/tpope/vim-fugitive (tim pope plugin) undo:…
comment by entelechy · 2016-05-15 · in Ask HN: What are your must-have packages for vim? -
I like vim-surround[0] and vim-unimpaired[1]. [0]: https://github.com/tpope/vim-surround [1]: https://github.com/tpope/vim-unimpaired
comment by thesteamboat · 2015-10-02 · in To Master Vim, Use It Like Language -
…and really read the docs and try to understand why it is what it is. Must have plugins are also https://github.com/tpope/vim-surround and https://github.com/tpope/vim-repeat
comment by czzarr · 2012-08-17 · in Vim and Vi Tips: Essential Vim and Vi Editor Skills, free on Amazon today only -
…and argtextobj: cia and daa. Those are the two plugins that I really miss on a stock vim. [0] https://github.com/tpope/vim-surround.git [1] https://github.com/vim-scripts/argtextobj.vim
comment by lloeki · 2012-06-21 · in Vim clutch -
…Pope, comes to mind if you do a lot of Git work and care about crafting really nice commits. [1]: https://github.com/tpope/vim-surround [2]: http://vimdoc.sourceforge.net/htmldoc/motion.html [3]: https://github.com/tpope/vim-fugitive
comment by tyrmored · 2012-06-10 · in Vim: Buffers, Windows, and Tabs -
…plugins also worth checking out: Easymotion - https://github.com/Lokaltog/vim-easymotion Surround - https://github.com/tpope/vim-surround
comment by CamT · 2011-10-17 · in Vim Text Objects : The Definitive Guide -
…, NerdTree: https://github.com/scrooloose/nerdtree , Surround: https://github.com/tpope/vim-surround , Snipmate: https://github.com/msanders/snipmate.vim (compulsory)
comment by seri · 2011-08-22 · in List of vim plugins I use - with mini tutorials -
…git submodules I might need while the former contains links to those I actually want active. [1] https://github.com/tpope/vim-surround
comment by lloeki · 2011-08-22 · in List of vim plugins I use - with mini tutorials -
I truly prefer to use git-subtree with pathogen. 1. add a repo: $ git remote add remote-vim-surround https://github.com/tpope/vim-surround.git 2. git-subtree: $ git subtree add --prefix=vim/bundle/vim-surround remote-vim-surround master 3.…
comment by Adaptive · 2011-05-11 · in Sane Vim Plugin Management with Vundle -
…inside of matching pairs, just think how much you'll like manipulating the pairs themselves! http://github.com/tpope/vim-surround
comment by rbxbx · 2010-07-04 · in Ask HN: Suggestions for mastering vim?