let oldcols=&columns
" More GUI options. Add icon, tearoffs and toolbar.
-se go=agilmrtT
+se go+=itT
" Allow dynamic window resize even if we aren't in an xterm.
se t_WS=\e[8;%p1%d;%p2%dt
" Restore window size.
au VimLeave * if exists("oldcols") | let &columns=oldcols | endif
-" Map C mode.
-au BufEnter * if &ft == "c" || &ft == "cpp" | call CMode_map() | endif
-au BufLeave * if &ft == "c" || &ft == "cpp" | call CMode_unmap() | endif
-
-" Map Perl mode.
-au BufEnter * if &ft == "perl" | call PerlMode_map() | endif
-au BufLeave * if &ft == "perl" | call PerlMode_unmap() | endif
-
" Map Makefile mode.
au BufEnter * if &ft == "make" | call MakeMode_map() | endif
au BufLeave * if &ft == "make" | call MakeMode_unmap() | endif
-" Entering C mode.
-fun! CMode_map()
- let oldcinkeys=&cinkeys
- let oldcinwords=&cinwords
- set cinkeys=0{,0},:,0#,!^F,o,O,e
- set cinwords=if,else,while,do,for,switch
-endfun
-
-" Leaving C mode.
-fun! CMode_unmap()
- set cinkeys=oldcinkeys
- set cinwords=oldcinwords
-endfun
-
-" Entering Perl mode.
-fun! PerlMode_map()
- let oldcinkeys=&cinkeys
- let oldcinwords=&cinwords
- set cinkeys=0{,0},:,!^F,o,O,e
- set cinwords=if,else,while,do,for,eval
-endfun
-
-" Leaving Perl mode.
-fun! PerlMode_unmap()
- set cinkeys=oldcinkeys
- set cinwords=oldcinwords
-endfun
-
" Entering Make mode.
fun! MakeMode_map()
set list
if version >= "600"
version 6.0
+" Set indenting by filetype.
+filetype indent on
+
" Track changing number mode.
let g:numbercols=&columns
let g:numberchanges=0
" Clear search pattern with Q/.
map Q/ :let @/=""<CR>:<CR>
-" Leaving Perl mode.
-fun! PerlMode_unmap()
- set cinkeys=oldcinkeys
- set cinwords=oldcinwords
- set foldmethod=manual
-endfun
endif
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""