tags:

views:

175

answers:

2

Ok, so I am trying to type the following in .cshrc file: alias ls 'ls --color=auto'. I type one character at a tiem.

However, when I reach --color= i type a and cursor goes to the next line.

I checked the .vimrc file and didn't fine anything out of whack. I am using vim7.2

EDIT

I noticed it is only happens in the .cshrc file, and cursor starts blinking with ' character.

I had "set mouse=a" set in .vimrc file

What is the problem?

+1  A: 

I cannot test it now, but probably something wrong with the appropriate indent file for that filetype. Does it happen if you edit some other configuration file ?

Thomas Geritzma
I only noticed the problem in .cshrc file.
vehomzzz
+3  A: 

Do you have textwidth set? If so it'll break your lines once they reach a certain length. Inspect the value via

:set textwidth?

Set it to 0 to turn off hard line-wrapping. Otherwise, do you have a mapped to something weird in insert mode? Check

:imap a

to see if you do.

Brian Carper
Even if that was the case, textwidth wouldn't break the word in half.
Thomas Geritzma
Does it only break at whitespace or can it be configured to break at non-word characters? I haven't messed with `textwidth` and friends much.
Brian Carper
Thomas, depends on `formatexpr`.
Michael Krelin - hacker
after i type ' as if alias ls ', the next character I type has a red background.
vehomzzz
@Brian - Yes, true. But that is so rarely used in a custom manner, that anybody asking about it, is surely not using it (custom formatexpr function).
Thomas Geritzma