Solved

how 2 c the man page with in the vi editor

Posted on 2003-12-04
12
348 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
  • 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 40 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now