LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-22-2011, 12:54 AM   #1
akhand jyoti
LQ Newbie
 
Registered: Feb 2011
Posts: 12

Rep: Reputation: 1
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!!!
 
Old 09-22-2011, 01:09 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Try this:
Code:
:map z :w^M:!./%^M
Hope this helps.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the command to show console character map? lyrica45 Linux - Newbie 6 02-16-2018 10:47 AM
Bash Command Line Editor, while typing run another command before executing current? gumaheru Linux - General 5 04-13-2010 11:21 AM
A question abut grub map command.. pinenut Linux - General 7 11-01-2009 09:29 PM
What command displays the character map? lyrica45 Linux - Newbie 1 02-25-2009 02:09 AM
GUEMap compatible map editor in linux hamster Linux - Software 11 11-24-2007 01:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration