"
" set guioptions-=T
" going to use this until it comes back to bite me...
" Amazing - it never did.
"
set autowrite
"
" Setting for Mac, but perhaps not always want this
"
"set makeprg=xcodebuild
set makeprg=make
set guifont=Monaco:h13
"
" Defaults for Bash-Support Vim plugin
"
let g:BASH_AuthorName = $USER_NAME
let g:BASH_AuthorRef = $USER_REF
let g:BASH_Email = $USER_EMAIL
let g:BASH_Company = $USER_COMPANY
syn on
"
" Set color scheme
"
" colorscheme obsidian
color obsidian
" colorscheme chlordane
" colorscheme colors
" set backup
set nocompatible
" My personal preference on Mac with no PgUp/PgDn
" Don't need up,down,left,right mapping if have arrow keys so make these keys more useful
" On keyboard the keys are arranged H L J K so for latin based language readers, it makes
" logical sense that H goes left/prev char and K goes right/next char, but normally L goes
" down and J goes up which makes no sense to me. Logically L should go up/prev line and K
" go down/next line to be consistent. So I have remapped them as follows:
" H -> go to beginning of the current line
" L -> go to the end of the current line
" J -> go up a page
" K -> go down a page
" If you want to move about by characters, there are the arrow keys
map h ^
map l $
map j
map k
map :cn
map :cp
" or
" map <Ctrl>N :cn<Ctrl>V<Ctrl>M
" map <Ctrl>P :cp<Ctrl>V<Ctrl>M
" Stuff From wiki
set ts=2 sw=2 et
" set shiftwidth=4
" set softtabstop=4
set expandtab
" Justin informs me that :0 in your cinoptions is how you prevent the extra indentation on switch statements.
"cinoptions=[options],:0
"cinoptions+=:0
set tags=$BASEDIR/.tags
map <space> <C-]>
map <tab> <C-T>
set shiftround
set autoindent
map <C-E> :!p4 edit %<CR>:set noreadonly<CR>
map Q :" Q enters EX mode. You don't want EX mode.
syn keyword cType uchar ushort uint ulong
syn keyword cType pchar puchar pcchar
syn keyword cType Q_INT8 Q_INT16 Q_INT32 Q_LONG
syn keyword cType Q_UINT8 Q_UINT16 Q_UINT32 Q_ULONG
syn keyword cConstant TRUE FALSE
syn keyword cStorageClass Q_EXPORT
filetype on
set ignorecase
set smartcase
set incsearch
set hlsearch
" Spelling
let IspellLang = 'british'
let PersonalDict = '~/.ispell_' . IspellLang
abbreviate teh the
" * Keystrokes -- Moving Around
" have the h and l cursor keys wrap between lines (like <Space> and <BkSpc> do
" by default), and ~ covert case over line breaks; also have the cursor keys
" wrap in insert mode:
set whichwrap=h,l,~,[,]
" use <F6> to cycle through split windows (and <Shift>+<F6> to cycle backwards,
" where possible):
nnoremap <F6> <C-W>w
nnoremap <S-F6> <C-W>W
" have % bounce between angled brackets, as well as t'other kinds:
set matchpairs+=<:>
" have <F1> prompt for a help topic, rather than displaying the introduction
" page, and have it do this from any mode:
nnoremap <F1> :help<Space>
vmap <F1> <C-C><F1>
omap <F1> <C-C><F1>
map! <F1> <C-C><F1>
" * Keystrokes -- Formatting
" have Q reformat the current paragraph (or selected text if there is any):
nnoremap Q gqap
vnoremap Q gq
" have the usual indentation keystrokes still work in visual mode:
vnoremap <C-T> >
vnoremap <C-D> <LT>
vmap <Tab> <C-T>
vmap <S-Tab> <C-D>
" have Y behave analogously to D and C rather than to dd and cc (which is
" already done by yy):
noremap Y y$
" * Keystrokes -- Insert Mode
" allow <BkSpc> to delete linue breaks, beyond the start of the current
" insertion, and over indentations:
set backspace=eol,start,indent
" Why, because some MORON decided that gcc would be better at wordwrapping then anything else, and GOT IT WRONG!
set errorformat=%A%f:%l:%m,%C\ \ \ %m,%*[^\"]\"%f\"%*\\D%l:\ %m,\"%f\"%*\\D%l:\ %m,%-G%f:%l:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,%-G%f:%l:\ for\ each\ function\ it\ appears\ in.),%f:%l:%m,\"%f\"\,\ line\ %l%*\\D%c%*[^\ ]\ %m,%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',%DMaking\ %*\\a\ in\ %f
if !exists("autocmd_loaded")
let autocmd_loaded = 1
" autocmd BufNewFile,BufRead *.cpp,*.c,*.h,*.txt,*.qdoc,*.doc setlocal spell spelllang=en_us
autocmd BufNewFile,BufRead *.doc,*.qdoc,*.book,*.leaf set filetype=doc
autocmd BufNewFile,BufRead *.pro,*.pri set filetype=pro
autocmd BufNewFile,BufRead *akefile*,*.inc,*.mak set noexpandtab
autocmd BufNewFile,BufRead *akefile*,*.inc,*.mak set filetype=make
endif
" Remember the position of the cursor from previous edits
autocmd BufReadPost *
\ if expand("<afile>:p:h") !=? $TEMP |
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ let b:doopenfold = 1 |
\ endif |
\ endif
" Need to postpone using "zv" until after reading the modelines.
autocmd BufWinEnter *
\ if exists("b:doopenfold") |
\ unlet b:doopenfold |
\ exe "normal zv" |
\ endif
set nowrap
" Enable right-clicking on things for a pop-up menu (instead of selecting)
" :set mousemodel=popup_setpos
set ruler
" set number