Gvim configuration

Shadow2531

[H]ard|Gawd
Joined
Jun 13, 2003
Messages
1,670
Trying out Gvim 6.3 on WinXP again and I need a little help getting things the way I want.

I have been playing with _gvimrc to automatically set my settings, but I'm having a few problems and the docs are a mess. Here are the settings I'm using and a bunch of questions. Thanks.


My first problem is, I don't want the automatic newline at the end of the file so I do:

set binary
set noel
set ff=dos

However, the newline format is stuck on unix in binary and I can't get it to dos. If I don't use binary, I can, but then I get that nasty new line. How do I get no newline and keep DOS format (CR+LF)? "set noel" doesn't work when not in binary.


I also want to start in insert mode, so I do:

set im

However, I can't use ESC and type commands anymore. I tried "set ek", but that doesn't work (Not sure that's the right setting anyway) . Any way I can fix that?

I'd also like to start with a blank page, but ":enew!" doesn't work in _gvimrc. I don't like the default text even if it does clear when you start entering text. I don't know if I can get used to that or doing :enew! and saving to a file first. Anway to fix that?

Also, I want it to default to UTF-8 with a BOM when I create a new buffer and save it. Also, when I open a file, I want it to detect what encoding the file is in and use it. Also, when opening files, I'd really like it to detect what newline format is used in the file and keep using it with the option to convert. Can that be done? "encoding", "fileencoding" and "set bomb" seem to have no effect.

I then want the tab length set to 4 and want to insert spaces instead of a tab, which does work as long as I put these commands after switching to binary. No problems with this, but I want to make sure they still work after any suggestions.
set ts=4
set et

I also need to make sure the backspace still works like other editors.
set backspace=indent,eol,start

I also, want to make sure long lines don't wrap. For example, I don't even want it wrapping after a million columns.

Also, does gvim support block editing like EditPlus's column select?

What about, trim trailing spaces, join lines, to upper case, to lower case? Do I have to code those functions myself?

How about entering unicode characters? I think you have to do ctrl+v, but don't know if I'm doing that right.

Been sifting through sites and docs and not finding what I want to know. Any help is appreciated. (Like links etc or just a "here's my rc file")
 
Back
Top