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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:59:18+00:00 2026-06-12T03:59:18+00:00

This is my path copied from the context menu Windows Explorer: C:\Vim Python\getTime.py and

  • 0

This is my path copied from the context menu Windows Explorer: "C:\Vim Python\getTime.py" and I’m trying to use The Vim Expression Register as seen in Derek Wyatt’s blog to insert output from a given Python script into a buffer.

I’ve tried all combinations I can think of slashes and quotes to get the following command to bind <c-j>dto insert the output of the script like so:

imap <c-j>d <c-r>=system("C:\Vim Python\getTime.py")<cr>

but I can’t seem to get it working without having it insert the following error:

'C:\Vim' is not recognized as an internal or external command,
operable program or batch file.

What do I need to change in order to use a filepath with spaces in it?

If you’d like to see what I’ve tried, take a look at the pastebin for a good laugh. The searches I’ve done lead me to a few different places, but none of them solved my issue, or at least, I didn’t read them correctly.


The correct solution for me was:

imap <c-j>d <c-r>=system(shellescape('C:\Vim Python\getTime.py'))<cr>

Thanks to Chiel 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-12T03:59:19+00:00Added an answer on June 12, 2026 at 3:59 am

    Use the shellescape function of vim.
    Type :help shellescape in vim to get specific info.

    So changing your line to imap <c-j>d <c-r>=system(shellescape("C:\Vim Python\getTime.py"))<cr> should do the job.

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

Sidebar

Related Questions

I have a path like this: parent/child/reply How do I use PHP to remove
I'm trying to use rspec with mongoid but I'm running across this error: undefined
I try to use NHibernate from IronPython. I have copied the NHibernate dependencies to
I'm trying to use a CMake script to compile a Boost-based application on Windows.
I've got this path; path = Cash Report\\30-03-2012 01-11-07 Cash Flow Report.Docx When I
I have this line of code: this.Path = pathLookUpLocation.GetValue(RegLookupKey, null).ToString(); When I run static
How would I do in a SELECT query to reverse this path : z/y/x
fopen(C:/xampp/htdocs/adv/application/views\helpers/Layout.php) how to fix this path? And why does ZF is searching for bundled
I noticed, that sometimes (especially where mod_rewrite is not available) this path scheme is
Having a method like this: @GET @Path(/name/{name}) @Produces(MediaType.TEXT_PLAIN) public String getProperty(@PathParam(name) String name) {

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.