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

  • Home
  • SEARCH
  • 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 8988505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:01:18+00:00 2026-06-15T22:01:18+00:00

I want the key combination <C-X> to run the command :! python application.py .

  • 0

I want the key combination <C-X> to run the command :! python application.py. From all my understanding of mapping, I tried the following: :map <C-X> :! python application.py which almost works. It just opens the command line and types the command in, but I still have to press return for the command to launch.

Is there any way I can get it to run the command as well?

  • 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-15T22:01:19+00:00Added an answer on June 15, 2026 at 10:01 pm

    I found an answer in an unrelated post while doing my last searches before posting the question. It seems that putting <CR> behind the command executes it, making this do what I wanted:

    :map <C-X> :! python application.py<CR>
    

    According to the comments (thanks to melpomene) <CR> means “carriage return”, which in effect means “press enter” and is just what I needed in this case.


    Slightly related, I also found out that :!! repeats the last shell command executed, making my map somewhat superfluous.

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

Sidebar

Related Questions

If I want to create a custom key combination to run a command, are
I have an application which uses a key combination that is composed of more
I want to capture key event at all time, even when my application is
What I want to do is implement a TextBox which accepts a key combination
The scenario: Table1 CatId|Name|Description Table2 ItId|Title|Date|CatId (foreign key) I want to return all rows
I want to remove a key from a dictionary if it is present. I
I want to interpret Enter key as Tab key in whole my WPF application,
I want to have a shortcut key combination (like Ctrl+Alt+D) in my app to
I have a table GB_Assignor_Assignee. I have a primary key which includes this combination(StateCode,
I am trying to map a key combination to an existing key combination and

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.