?
Solved

how 2 c the man page with in the vi editor

Posted on 2003-12-04
12
Medium Priority
?
354 Views
Last Modified: 2013-12-13
hi,,,
I would like to see the man page in vi editor itself with out going to the shell,,,,

i need the man page of the word where the cursor blinks in the vi editor if i press <F1> function key????

Thanks for the all who try for the solution
 
0
Comment
Question by:k_kalyan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 2
12 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 9874873
This is not how vi works. You may be able to do this with vim (http://www.vim.org).
I use vi because it's the most efficient editor I know, but it sounds like you are used to something else (e.g. Visual Studio, which does bring up the information for the keyword under the cursor when you hit F1). Do you need to use vi? There are development environments very similar to Visual Studio available for Linux. One example is kdevelop. If I remember correctly, it does integrate the documentation into the IDE.
0
 
LVL 1

Expert Comment

by:ChiefEngineer
ID: 9877761
I don't know any way to do what you're asking for (context sensitive help with a keystroke) from inside vi, but you can do something very simple that can give you almost the same result:

In command mode of vi (pressing ESC key) go to vi command-line (press ':' key) and type the following:

:!man <word_which_man_page_are_you_looking_for>

(dont type the ':' again, is just what the screen will look like) and press the Enter key.

This will show you the man page whitout leaving vi and let you get back to your editing session by just quitting the man page viewer.

Hope it helps you.
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 160 total points
ID: 9879708
Actually, it is possible: http://vim.sourceforge.net/scripts/script.php?script_id=489

This page describes a man page viewer for vim: You position the cursor over a keyword and then hit the "K" key (F1 is already used by vim for it's own help). The page also links to a second page that shows how you can kick up the display of man pages in vim a bit.
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 9881838
This is a duplicate of a duplicate. I've posted the answer in your first question.

http://www.experts-exchange.com/Operating_Systems/Linux/Q_20817179.html
http://www.experts-exchange.com/Operating_Systems/Linux/Q_20816112.html

You can display man pages for keywords in vim by using this vim macro:
http://vim.sourceforge.net/scripts/script.php?script_id=489
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 9881849
Sorry, the last message should not have ended up in this question
0
 
LVL 33

Expert Comment

by:hongjun
ID: 9882742
k_kalyan, you can do this in vi

In command mode, type this
    :!man man
to see man page for man


hongjun
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10178968
I provided the only valid solution with the link to http://vim.sourceforge.net/scripts/script.php?script_id=489
Recommend to accept my answer.
0
 
LVL 33

Expert Comment

by:hongjun
ID: 10181153
mine will work.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10182781
hongjun, your answer will _NOT_ work: The question was to automatically display the man page for the command under the cursor. Your answer has two problems: It is not automatic, and it will only display the man page for the "man" command. This is _NOT_ a solution for this question.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10328580
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by khkremer
Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

khkremer
EE Cleanup Volunteer
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Fine Tune your automatic Updates for Ubuntu / Debian
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month9 days, 2 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question