Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8632601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:22:31+00:00 2026-06-12T09:22:31+00:00

Just installed the surround.vim plugin and some of the commands don’t work as expected.

  • 0

Just installed the surround.vim plugin and some of the commands don’t work as expected. I am using this question as an example

This is a lo*ng line and I want to highlight two words

a ys2aw" should change the above to

This is a "long line" and I want to highlight two words

but for me it changes it to

This is a g and I want to highlight two words

Other times it has no affect at all! I think it has to do with what is in the yanked register.

When I am typing ys, in the bottom right I can see that it quickly changes to g@

Finally, I am pretty sure no other plugins are interfering as by issuing the verbose map yss command:

 n  yss           <Plug>Yssurround
    Last set from ~/.vim/plugin/surround.vim                                                                                                                     
 n  ys            <Plug>Ysurround
    Last set from ~/.vim/plugin/surround.vim

Does anyone know what is going wrong here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:22:31+00:00Added an answer on June 12, 2026 at 9:22 am

    I figured it out, to make it easier to copy/paste between vim and, well, everything else, I had the following rule in my .vimrc file:

    set clipboard=unnamedplus
    

    This makes surround.vim behave incorrectly. Instead what I did was add the following line to my .vimrc file to allow me to toggle this desired behaviour on/off

    nnoremap <leader>hf :set clipboard=unnamedplus<CR>
    nnoremap <leader>fh :set clipboard-=unnamedplus<CR>
    

    and now surround.vim works as normal

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just installed FuzzyFinder for gvim, though for some reason it's using an ultra
So, I've just installed the zen-coding.vim plugin and expansions aren't happening. The plugin is
I just installed Fedora in a virtual machine, and when I open vim, my
I just installed python2.6 parallel to my python2.4. I ran this command ln -s
I just installed Graphite & statsd to get some statistics for my web-application. It
I just installed eGit plugin and I'm playing around with it. I'm new to
I just installed an Ubuntu 10.10 desktop on a system to do some development
I just installed postgresql on my mac (lion) using homebrew, and when I use
Just installed POI 3.8 jars and changing over code...I get this error: public static
Just installed django-db-log module and trying to make it work properly. 'python manage.py syncdb'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.