Solved [Solved] Embarassed

My brain is actively farting right now. In vi I can wq! to override saving to a read-only file. However, in gvim I can't. What is the command to group gvim with vi? I did a man -k group and got a little overwhelmed. :r
Re: Embarassed

fonz said:
Come again? I'm pretty sure it's supposed to work with both.
I think is should too - Shift+; gives me the prompt. However, in gvim I can't. I think there's a group/process setting that vi might have that gvim doesn't.
Re: Embarassed

It's because vim's vi-compatible mode doesn't let you.

:set nocp
will fix it, but you'll want to read the documentation to see what else it changes since I don't actually use vim.
Re: Embarassed

Ah, I thought it was an OS level issue. Thanks, that worked. I created a ~/.vimrc file with
set nocp
in it. I found a lot of people customize that file, so I'm wading through a few to see what helps. Thanks again.
There are lots of options that I usually set:

set number - line numbers on the side
set tabstop=<num> - number of columns a tab represents
set shiftwidth - how much to indent when pressing tab (optionally use set expansion to expand tabs to spaces); should be the same as tabstop unless you know what you're doing
set smartindent - auto indent when hitting enter
syntax on - turn on syntax highlighting
colo <theme> - syntax color theme

There's lots more, and you can install plugins too.
Re: Embarassed

tzoi516 said:
I created a ~/.vimrc file [...]. I found a lot of people customize that file, so I'm wading through a few to see what helps.

You might (or might not) find some useful options in this one.
Re: Embarassed

tzoi516 said:
I found a lot of people customize that file, so I'm wading through a few to see what helps.
Here's what I have in my ~/.vimrc:
" Fonz's .vimrc file - enjoy!

" Indentation
" autoindent/smartindent alone copies indent from previous line
" %retab! replaces tabs with spaces on crappily formatted code
" Ctrl-T/D adds/removes indent levels
filetype indent on
syntax on
set expandtab
set shiftwidth=2
set textwidth=80
set cc=+1
"set autoindent

" Automagic reading/writing of modified files
set noautoread
set noautowrite
set noautowriteall

" Additional options for GUI version
if has("gui_running")
  set browsedir=last

" Disable annoying as hell mapping of F1 to help
nmap <F1> <nop>

" Miscellaneous behaviour, mostly self-explanatory
set backspace=eol,indent,start
set nobackup
set cmdheight=1

set ruler

colorscheme fonz

autocmd Filetype mail set textwidth=74
And ~/.gvimrc:
set guifont=Terminus\ 10
set cursorcolumn
set cursorline

colorscheme fonz

Both are a continuous work in progress (there's a lot that can be configured in Vim) but perhaps there are some things in there you find useful. I also seem to recall that (quite) some time ago there was a thread here about what people put in their ~/.(g)vimrc files. I'd suggest searching for that one.