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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:45:05+00:00 2026-05-27T13:45:05+00:00

In TextMate when you are editing a line of text and you press command

  • 0

In TextMate when you are editing a line of text and you press command + enter it inserts a newline and brings the cursor to that new line without bringing down any text from the previous line. Is there a way to create this feature in Vim? Any insight would be much appreciated. Thanks!

  • 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-27T13:45:06+00:00Added an answer on May 27, 2026 at 1:45 pm

    The following mapping works:

    inoremap <D-Enter> <ESC>o
    

    The D maps the command key on Mac. The answer by CatPlusPlus shows how this would work when using the Control key instead.

    Note that mapping the command key only works in MacVim.

    So in order to make this fail proof inside your vimrc do the following:

    • Check if a gui vim is running via:

      let isGui  = has("gui_running") 
      
    • Check if you are running on a Mac via:

      let isMac  = has("mac")
      
    • Now adjust your mapping accordingly:

      if(isGui && isMac)
        inoremap <D-Enter> <ESC>o
      else
        inoremap <C-Enter> <ESC>o
      endif
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm editing a django template. When I press enter while my cursor is between
TextMate has one irritating 'feature' that shows up when editing lot of files (within
I currently use Textmate for most of my editing, but am taking a Java
I am using haml in ruby on rails and editing it in text mate.
TextMate has a nice feature that allows you to execute a script from within
Textmate has a Python PEP8 bundle that will run pep8 validation on your file.
Can TextMate be changed to shift text to right by highlighting text and pressing
New to TextMate and can't find the answer in the documentation. I've saved an
In Geany, editing PHP scripts, when you select lines and press control-e, the selected
I am giving TextMate a try for some quick editing of a few script

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.