LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   map command in VI editor (https://www.linuxquestions.org/questions/linux-newbie-8/map-command-in-vi-editor-904337/)

akhand jyoti 09-22-2011 12:54 AM

map command in VI editor
 
Hi All,

I am trying to map z for save the file and execute that file without exiting to vi. so i did

:map z :w^M:!%^M


but it is giving message like -

:!<file name>
/bin/ksh: line 1: <file name>: not found

shell returned 127[/COLOR
]

Please Advice!!!

druuna 09-22-2011 01:09 AM

Hi,

Try this:
Code:

:map z :w^M:!./%^M
Hope this helps.


All times are GMT -5. The time now is 08:02 PM.