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 5953891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:53:29+00:00 2026-05-22T17:53:29+00:00

I would like to mimic Textmates CTRL+ALT+w, which creates a new pair of opening

  • 0

I would like to mimic Textmates CTRL+ALT+w, which creates a new pair of opening and closing HTML tags on the same line.

In VIM Surround I’m using CTRL+st in Edit mode for this, but it always indents and creates a new line after setting the tag, so that it looks like this (* = cursor position):

<p>
  *
</p>

Is there a way to achieve this? :

<p>*</p>
  • 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-05-22T17:53:30+00:00Added an answer on May 22, 2026 at 5:53 pm

    I guess your problem is that the selected area is “line wise”. For example, if you select a few lives with V and surround it with tags, the tags will be placed one line above and one bellow the selected lines.

    You probably want to create a “character wise” selection, with v before surrounding it.

    Anyway, please post the map you created, so we can help debugging this.


    Update

    After some clarification in the comments, I would tell you that the surround plugin is not the best option. As its name describes, it was created to deal with surrounded content. So you may need content to surround.

    In your case, I recommend taking a look in HTML AutoCloseTag. This plugin closes the html tag once you type the >. It is certainly more appropriated, and uses less keystrokes than surround.

    <p         <--- Now when you type ">", if becomes:
    <p>|</p>   <--- Where "|" is the cursor.
    

    Obviously, you will get this behavior to every tag. But that may be handy if you like it.

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

Sidebar

Related Questions

How do you mimic tabs in HTML? Specifically, I would like to be able
I would like to mimic the auto-incrementing primary keys feature that many databases have
I would like to mimic the Grails way of resolving i18n messages. In WEB-INF/i18n/
I want to draw some listview items disabled and would like to mimic the
I would like to create a c++ type that mimic the build-in type exactly.
I would like to mimic the Run command in Windows in my program. In
We would like to mimic taking user input one letter at a time (intended
I would like to mimic the RepeatColumn function of the ASP.NET DataList control in
I would like to setup my windows authentication login to SQL to mimic the
I would like to mimic a standard JavaScript confirm() using a jQueryUI dialog. I

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.