Questions tagged [plugin-vim-surround]

surround.vim is a plugin by tpope to ease quoting and parenthesizing

Filter by
Sorted by
Tagged with
1
vote
1answer
27 views

Vim-surround with “onemore”

I have the following setting on: set ve+=onemore "allows us to go one-past the last character, emulating ctrl-e in normal programs This is helpful for a lot of navigations and other commands I use. ...
3
votes
1answer
61 views

delete brackets and select region

Is there a quick way to delete brackets ( some string ) and then select "some string"? ds( deletes them (using the surround plugin). vi( selects but only when they exist. looking for normal mode.
1
vote
2answers
38 views

How to use surround.vim to quote a single character?

I'm a user of the surround.vim plugin that lets me surround words with quotes, brackets, etc. I'm facing an issue with surrounding a single character with e.g. quotes, when the character is adjacent ...
1
vote
1answer
94 views

Vim-Surround but not shift+S in visual mode

How do I disable vim-surround in visual (selection) mode? IE. If I hit shift+S I want to replace all the lines I have currently selected ( the normal vim functionality )
0
votes
1answer
42 views

Surround on tex files

I have both vimtex and surround plugins installed(and ultisnip if matters). When doing surround in visual mode (using S) on a tex file, and when I press \ next I get immediately \begin. I am not sure ...
1
vote
1answer
34 views

Add surrounding quotes no leading whitespace

my question is simillar to this: How do I surround a quoted string without including leading whitespace? But not exactly. I am using vim-surround. I have a string print he^llo_and_welcome where ...
1
vote
2answers
88 views

Delete whitespace before and after word

I have some text with two dashes: This is some text -- with two dashes. I want to delete the space before and after the dashes: This is some text--with two dashes. Is there a way this can be done ...
3
votes
1answer
191 views

Reclaim cursor shape in operator pending mode of neovim while using vim-surround

I'm somewhat ashamed to admit, the main reason I chose neovim over vim was it's native feature of changing cursor shape in different modes. For example, it uses vertical-bar in insert mode, block-...
1
vote
3answers
276 views

Surround part of line with comment /* .. */ [duplicate]

Is it possible to surround a selected part of a line with /* and */? start COMMENT ME end start /*COMMENT ME*/ end
2
votes
3answers
151 views

Quoting blocks but ignoring whitespace

Let's say I have Foo BAR Baz Quxxx Foo Baar Asd Duxxxxx Bar Foo Baazzz Kuxx Baz I would ideally like to be to highlight the first, second, or third column. Then I would ...
0
votes
2answers
661 views

Visual block mode and vim surround?

Let's say I have text like this, SPAC SPAC - Specific-Purpose Committee Campaign Finance Report SPAC-SS SPAC-SS - Specific-Purpose Committee Special Session Report SPAC-T SPAC-T - ...
1
vote
0answers
104 views

surround plug-in within global command

I've been unable to use surround within a global command, For example: g/^/ norm! yss" seems to do nothing or replaces the entire line by the contents of the clipboard. This is consistent with ...
0
votes
1answer
44 views

Is there possibly something wrong with (i)mapping the left bracket?

I've been using the vim-surround plugin for as long as I can remember and have grown accustomed to typing <c-g>s ) when I want to insert text between brackets. I was writing with the atom editor ...
0
votes
2answers
222 views

Mapping using tpope/vim-surround only works with command

I have this mapping to surround a Word with jQuery id selector $("#...") and it works fine using a command: command! JqId normal viwo^[i#^[ysiW"ysiW)i$^[E nnoremap <Leader>jqid :JqId<CR> ...
4
votes
2answers
210 views

surround plugin and TeX quotes `'

Is it possible to make the surround plugin work on `TeX-style quotes' and ``TeX-style double quotes''? (Normally, if `this is quoted'| and `this', va' will select from the first closing mark to the ...
3
votes
2answers
904 views

How can I change mapping for vim-surround plugin?

I don't mind keeping the original mapping, I just want to bind it to something more convenient, so instead of typing ysiw), I could for example do it with Alt(. I tried just adding nnoremap <M-(&...
2
votes
1answer
263 views

Replace surrounding quotes for < >

Given the string "hello.h", I want to obtain <hello.h>. I have tried vim-surround, but while it seems to be able to surround with matching { }: cs"{ ( ): cs"( [ ]: cs"{ XML tags: cs"<mytag&...
2
votes
2answers
168 views

How do I quote tabulated columns?

Currently, I'm using Vim Surround to make quoting easy on Multiple whole-lines Visual blocks Individual words However, it doesn't seem to make the job easy on columns, for example. Take this ...
1
vote
1answer
251 views

`s` doesn't trigger surrounding, but substitute (`cl`)

I installed this vimrc configuration (including plugins), and saw that vim-surround was included. With that, the surround-readme tells me I can use things like ds" to delete surrounding quotes. ...
5
votes
2answers
187 views

How do I surround a quoted string without including leading whitespace?

I have a string like 'foobar', and I want to surround it with parentheses: ('foobar'). With vim-surround, I can do ysi'), which produces '(foobar)'... Not what I want I can also ysa'), but that will ...
7
votes
1answer
592 views

Why does vim surround add spaces in this example?

Old text Command New text Hello *world ysiw( Hello ( world ) Hello *world ysiwb Hello (world) Hello *world ysiw) Hello (world)...
1
vote
1answer
81 views

Surround.vim deletes selection

I'm trying to use surround.vim plugin and make a basic surround with a " sign. Documents states that i need to for example select a word with v and press s". However, i'm not able to use that nor any ...
5
votes
1answer
595 views

How can I get vim-surround to automatically indent surrounded HTML code?

I am wanting to wrap the <h2> and the <div> blocks below and surround them both with another <div> <body> <h2>Im a heading</h2> <div class="row"> ...
1
vote
1answer
212 views

delete surrounding eruby tag in rails

When adding a new pair of eruby tag like <%= %> surrounding Time.now, just type below keys: yss= It does the job <%= *Time.now %>. I have no idea how to do the opposite by removing it ...
5
votes
1answer
228 views

Disable vim-surround in a netrw buffer

Is there a way to disable a plugin (or a set of keymaps) on a specific filetype? vim-surround causes a delay in netrw when pressing d to create a new directory. I'm thinking that this might be ...
2
votes
4answers
758 views

How can I surround the lines inside the html tag object?

I have the following piece of HTML: <div> <section> </section> </div> I would like to wrap the 2 section tags in a single article like so: <div> <article> ...