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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:39:13+00:00 2026-05-20T20:39:13+00:00

grr. I’m struggling with Vim’s learning curve. And trying to get a simple mapping

  • 0

grr. I’m struggling with Vim’s learning curve.
And trying to get a simple mapping in my vimrc to execute the current buffer’s python script.
The mapping is well-formed and works after I enter it into the command line in Vim. This is the mapping:

map <buffer> <S-e> :w<CR>:!usr/bin/env python % <CR>

But it won’t load from my vimrc 🙁 I’m using the basic .vimrc_sample with only this mapping appended. What’s weird is that I could get a different mapping working from the vimrc:

map <S-t> itest<Esc>

This one works, but not the script executer? What gives?
Ubuntu 10.10 Python 2.6 Vim 7.2

Help is very appreciated!

  • 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-20T20:39:14+00:00Added an answer on May 20, 2026 at 8:39 pm

    I suspect that you have something before map: <buffer> argument means that mapping is defined for current buffer only, so adding it to vimrc without something like autocmd FileType python before it is weird. Maybe it is the reason why it does not work: you somehow switch to another buffer before testing this mapping.

    Some additional things to concern:

    1. Never use map where can use noremap instead.
    2. You probably don’t want this mapping to be defined for visual (at least without <C-u> before w) and select modes, and definitely don’t want it to be defined for operator-pending modes, so use nnoremap.
    3. <S-e> and E are equivalent.
    4. You can combine w and !... in one command using pipe symbol: :w | !/usr/bin/env python %<CR>.
    5. You forgot slash before usr.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following HTML <select onchange=this.form.submit() name=name> <option value=9995101E01#17201044055PM>9995101E01#17201044055PM</option> <option value=GRR-Example>GRR-Example</option> <option value=admin>admin</option>
Ok, trying to debug another problem I have, I decided to make sure my
I am using emacs 23.1.1 on Ubuntu 10.04. I wish to program in Python
i have this dictionary sr = {'DTW':'CNT','FWA':'CNT','GRR':'CNT','IND':'CNT','MKE':'CNT','MLI':'CNT','MSP':'CNT','OMA':'CNT','ORD':'CNT','SBN':'CNT','STL':'CNT','BDL':'EST','BOS':'EST','BWI':'EST','CLE':'EST','CMH':'EST','CVG':'EST','EWR':'EST','IAD':'EST','JFK':'EST','MDT':'EST','PHL':'EST','PIT':'EST','ROC':'EST','ABQ':'CNT','AUS':'CNT','DEN':'CNT','DFW':'CNT','ELP':'CNT','IAH':'CNT','LRD':'CNT','MCI':'CNT','MFE':'CNT','MSY':'CNT','OKC':'CNT','SAT':'CNT','TUL':'CNT','ATL':'EST','BNA':'EST','CLT':'EST','JAX':'EST','MCO':'EST','MEM':'EST','MIA':'EST','RDU':'EST','RIC':'EST','SDF':'EST','SJU':'EST','TPA':'EST','ANC':'WST','HNL':'WST','LAS':'WST','LAX':'WST','PDX':'WST','PHX':'WST','RNO':'WST','SAN':'WST','SEA':'WST','SFO':'WST','SLC':'WST','SMF':'WST','TUS':'WST'} for s, r in sr.iteritems(): print s,
How do I get this directory out of conflict? I don't care if it's
My problem is that I have a user that is having a problem displaying
I have a DependencyObject in C# that is used in an array. Example shown
All of a sudden in this MVC site I have no views that can
Upgraded from MVC Beta to MVC RC1. Re-pointed all references in the project to
I'm tasked with automating the retrieval of a couple of BusinessObjects Web Intelligence reports

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.