Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
After looking through the O'Reilly Learning Vi book, I am still struggling to do the following two things in gvim:
[list=1][*]Formatting the Text so that all the words are complete (i.e. not spread over two lines [ such as re \n store])[*]Create bold headings[/list=1]
If anyone could help me do these, I'd be most grateful.
I am not sure about the first, but you aren't going to be able to create bold headings in Vim unless you're talking about HTML code or something. Vim (and GVim) are ASCII text editors, not word processors. If you're concerned about words wrapping at the end of a line, or doing any kind of formatting, you probably want to use a word processor instead (such as Kate, KWrite, OpenOffice Write, etc.) Vim is more for writing code and other strictly ASCII stuff.
for #1, you need to set a width, which will make vim act more like a wordprocessor (if I understood you correctly). Don't think you want this to be permanent, but a quick hack would be to add a alias to your ~/.bashrc:
:set textwidth=30 #number of columns
:set wrapmargin=10 #right margin
Note: wrapping only occurs while TYPING. It does not format previous text. use the 'gq' command to format a paragraph:
gq4j #format next 4 lines
gqgq #shortened to 'gqq' - format a line
gq} #format paragraph. cursor must be at the beginning of paragraph
gqip #formats a paragraph. no need for cursor to be at beginning of paragraph
There's so much stuff in vim, this should give you a start...