map - vimrc mapping problem; execute python script mapping not working from vimrc -


grr I'm struggling with the learning curve of VIM. Trying to get a simple mapping in your vimrc and to execute the current buffer's Python script. Mapping is well made and I work after entering it in the command line in Viam. This mapping is:
map & lt; Buffer & gt; & lt; S-e & gt; : & lt; CR & gt; :! Usr / bin / env python% & lt; CR & gt;
But it will not load from my VIMRC :( I'm using the original Vimrc_sample only with this mapping added. What is odd is that I could do a different mapping from VIMRC I am:
map itest
does it work, but the script is not executable?

>

I suspect that you have something before map : & Lt; buffer & gt; argument means that mapping is only defined for the current buffer, so it should be added to vimrc without something like autocmd FileType python before it is strange Perhaps this is the reason why it does not work: You can switch to another buffer before testing this mapping.

Concern of some addit Ional things:

  1. Never use map from where noremap is used.
  2. This mapping should be defined for the view (at least before w for w ) and the mode Choose, and of course, it should not be defined operator-pending mode, so use nnoremap .
  3. & lt; S-e & gt; and E are identical.
  4. You can w and ! ... can be added to an order using the pipe symbol: : w | / Usr / bin / env python% & lt; CR & gt;
  5. You forgot the slash before usr .

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -