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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:51:11+00:00 2026-05-28T06:51:11+00:00

I start using vim with zencoding plugin. For example, I type div, hit mapkey

  • 0

I start using vim with zencoding plugin. For example, I type div, hit mapkey and get this (where I is cursor position):

<div>I</div>

If then I will hit enter, I’ll get this:

<div>
I</div>

But I want to get this (like in SublimeText2 with the same zencoding plugin):

<div>
    I
</div>

How can I do it? Maybe there are some settings in zencoding plugin or secret mapkey in vim?

ps Sorry for my English.

UPD I try to use SparkUp, but it doesn’t work at all. I have Python 2.7 and “filetype … on” line in my vimrc file, but it still doesn’t work. Why? I don’t know.
And about surround plugin. It’s not the same, it’s like using snippets.

  • 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-28T06:51:11+00:00Added an answer on May 28, 2026 at 6:51 am

    This mapping works for me:

    inoremap <C-Return> <CR><CR><C-o>k<Tab>
    

    In detail:

    • inoremap means this is an INSERT mode mapping

    • <C-Return> means I have to hit Ctrl-Return to trigger it

    • <CR><CR> insert two carriage returns

      <div>|</div> ==> <div>
      
                       |</div>
      
    • <C-o> allows to type a single NORMAL command without leaving INSERT mode

    • k is the command in question and it moves the cursor one line up

      <div>       <div>
              ==> |
      |</div>     </div>
      
    • <Tab> moves the cursor to where I want it to be

      <div>      <div>
      |      ==>     |
      </div>     </div>
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In using vim, when I start a comment with //, immediately after I type
Whenever I start a shell in vim using :sh, it doesn't source my ~/.bashrc
Let's say you're using vim to select in visual mode. You hit v ,
How to search word start \word in vim. I can do it using the
I'm using the Command T plugin for vim and trying to remap a key.
I'm using VIM 7.1 When I search a string in file, the cursor is
Today's Daily Vim says this: Assuming you're using the bash shell, the following can
I frequently make mode errors while using vim, i.e. I'll start typing text while
I am using the Show Marks plugin in vim to display where the marks
I want to start using Python for small projects but the fact that a

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.