LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 01: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, 02:09 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Bash Command Line Editor, while typing run another command before executing current? gumaheru Linux - General 5 04-13-2010 12:21 PM
A question abut grub map command.. pinenut Linux - General 7 11-01-2009 10:29 PM
What command displays the character map? lyrica45 Linux - Newbie 1 02-25-2009 03:09 AM
What is the command to show console character map? lyrica45 Linux - Newbie 1 02-23-2009 08:40 PM
GUEMap compatible map editor in linux hamster Linux - Software 11 11-24-2007 02:19 PM


All times are GMT -5. The time now is 01:18 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration