PDA

View Full Version : post your vimrc



file cabinet
30 Jan 2005, 04:01 PM
what is yours?

"options
set ai
set backspace=2
set backup
set backupdir=$HOME/.vim/backup
set directory=$HOME/.vim/tmp
set expandtab
set filetype=on
set foldenable
set hid
set history=1000
set hlsearch
set nocompatible
set noerrorbells
set nu!
set ruler
set shiftwidth=4
set softtabstop=4
set tabstop=4
set whichwrap=<,>,h,l
set wildmenu
set fileformat=unix

"ui
colo darkblue
syntax on

"map
map <F2> :let @/=''<CR>:echo 'search cleared'<CR>
map <F3> :res +10<CR>:echo '+10'<CR>
map <F4> :res -10<CR>:echo '-10'<CR>

"autoindent on/off
map <F5> :set ai!<CR>:set ai?<CR>

"execute file
map <F6> :execute '!' . expand('%:p')<CR>

"cd to current/root directory of open file
map <F7> :execute 'cd ' . expand('%:h')<CR>:pwd<CR>

" next/prev buffers, will break vsplits mapping.
map <C-W>h :bp<CR>
map <C-W>l :bn<CR>

"taglist
let Tlist_Ctags_Cmd='/usr/bin/ctags'

au BufNewFile,BufRead *.geni :set ft=php

Star
30 Jan 2005, 06:18 PM
Is it very intp-ish to have neat and orderly config files like that?

Mine are all a mess. My .emacs has huge blocks that are half-broken and commented out and the file itself has no order to it whatsoever.

mgb
30 Jan 2005, 06:34 PM
What is vimrc?

Star
30 Jan 2005, 06:45 PM
A .vimrc is the configuration/preferences file for a text editor called 'vim', the linux weenie's editor of choice. :devil:

garak
30 Jan 2005, 07:14 PM
set nocompatible
"set smartindent " fucks up commenting in python
set number
"set list
set ts=4
set sw=4
set backspace=indent,eol,start
set expandtab
set showcmd
set showmatch
syntax on
set ruler
set showmode
set notitle
com Q q
com Wq wq
com WQ wq
com W w

"set foldminlines=10 foldmethod=indent
"set foldopen=block,hor,mark,percent,quickfix,search,tag,undo,jump

:highlight Folded ctermbg=black ctermfg=blue
:highlight FoldColumn guibg=darkgrey guifg=white


" bell off
set vb t_vb=

if has("autocmd")
filetype plugin indent on
autocmd FileType text setlocal textwidth=78
endif

let python_highlight_all = 1
hi ModeMsg term=bold cterm=underline

:set pastetoggle=<F11>

au BufNewFile,BufRead *.ccm set filetype=cpp
au BufNewFile,BufRead SConstruct set ft=python
au BufNewFile,BufRead SConscript set ft=python

au BufNewFile,BufRead *.dxg set filetype=cpp
au BufNewFile,BufRead *.ccm runtime syntax/ccm.vim

"Highlight the 81st character of each line
highlight rightMargin term=bold ctermfg=black ctermbg=blue guifg=red guibg=yellow
match rightMargin /\%<82v.\%>81v/

Geoff
30 Jan 2005, 10:23 PM
Is it anything like 'Vi'?

if ever I ended up in that, my config looked like this

"Help, How do I get out of this and get back to my Mud?"
"Oh no - control keys give me a random collection of symptoms"
set Geoff = smash keyboard.

-Geoff

garak
4 Feb 2005, 09:31 AM
Is it anything like 'Vi'?

if ever I ended up in that, my config looked like this

"Help, How do I get out of this and get back to my Mud?"
"Oh no - control keys give me a random collection of symptoms"
set Geoff = smash keyboard.

-Geoff
Vim is "Vi improved," so yeah. It's basically a souped up vi.