Gustin Johnson wrote:

>
> Quoting Michael Walters <[EMAIL PROTECTED]>:
>
>> Hello Gustin,
>>
>> I changed set nls to set hls because my vim editor was giving an error
>> message.
>
>
> hls is what what I have saved, not sure nls is.
>
>>
>> I no longer have an error message, but with the following .vimrc file I
>> still could not get line wrap to work in Vim:
>>
>> syntax on
>> set wrap
>> set hls
>> set noia
>
>
> From within vim, what happens when you type:
> :set wrap


I did a :set wrap before I put it in the .vimrc file and it did not wrap
then either.

> the .vimrc reads the exacts same things you can do manually from
> within vim jsut
> without the ":"
>
> So, to test the things in your .vimrc, you can enter them in once
> inside vim by
> prefixing a colon ":".
>
> In this case it should wrap with the width of your terminal.
>
> You could put something like this:
> set textwidth=80
> in your .vimrc to force 80 colums
>

I will add set textwidth=80. But the line wrap does not even keep words
together but lets them split.

> For writing regular text (ie. not code) I will often use
> set wrapmargin=8
>
>
>>
>> I looked at http://www.vim.org/tips/ but was overwhelmed by the volume
>> of tips.
>>
>
> Yes there is a lot there.  Usually I am looking for something when I
> go there.
>
> Since you mentioned c, you set the file type for syntax highlighting:
> eg.
> set filetype=python
> set filetype=c
> set filetype=php
>
>
>> Thanks in advance,
>>
>> Michael Walters
>>
>> ________________________________________________________________
>>
>> Gustin Johnson wrote:
>>
>>> On Mon, 2005-06-06 at 06:00 -0600, Michael Walters wrote:
>>>
>>>
>>>> Hello Gustin,
>>>>
>>>> Why did you set the following?:
>>>>
>>>> set noexpandtab
>>>>
>>>>
>>>>
>>>
>>> This causes vim to use a tab character instead of a set of spaces.
>>>
>>>
>>>
>>>> Does that mean that you can not now use tab in Vim?
>>>>
>>>>
>>>>
>>>
>>> I use TAB all the time.  It is just a different behaviour from the
>>> "stock" vim.
>>>
>>>
>>>
>>>> For ordinary text files like my daily agenda I like to have line wrap
>>>> working for long agenda items. And when line wrap was on it did not
>>>> seem
>>>> to hurt the compilation of my C programs.
>>>>
>>>> I looked for .vimrc in both my /home directory and my /home/michael
>>>> directory and it did not seem to be there. The file .viminfo does seem
>>>> to be there.
>>>>
>>>> Should I create a .vimrc file containing the following? :
>>>>
>>>>
>>>>
>>>
>>> Yes.  It is not created by default (on the distros I have used anyway).
>>>
>>>
>>>
>>>> syntax on
>>>> set wrap
>>>> set is
>>>> set nls
>>>>
>>>> I have left out the following on the previous list:
>>>>
>>>> set ignorecase (because C programming is case sensitive)
>>>> set noexpandtab( because I want line wrap to go to my last
>>>> indentation).
>>>>
>>>>
>>>>
>>>
>>> You can also set the following:
>>> nmap <silent> <C-N> :silent noh<CR>
>>>
>>> What this does is map Ctrl-N to turn off your search highlighting,
>>> which
>>> I personally find annoying (hence the key mapping)
>>>
>>> Also, a useful tip is the "*".  Pressing "*" will search for the word
>>> under the cursor.  Like everyone else who learns about this I wish I
>>> had
>>> figured it out far earlier than I did.
>>>
>>> I periodically check http://www.vim.org/tips/ which is where I find
>>> some
>>> of this stuff.
>>>
>>> Cheers.
>>>
>>>
>>>
>>> --------------------------------------------------------------------
>>


Thanks in advance. I will try your suggestions.

Michael

_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to