Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if has("mouse")
- set mouse=a
- if &term =~ '^screen'
- set ttymouse=xterm2
- endif
- endif
- if has("cscope") && filereadable("/usr/bin/cscope")
- set csprg=/usr/bin/cscope
- set csto=0
- set cst
- set nocsverb
- " add any database in current directory
- if filereadable("cscope.out")
- cs add cscope.out
- " else add database pointed to by environment
- elseif $CSCOPE_DB != ""
- cs add $CSCOPE_DB
- endif
- set csverb
- endif
- if has("title")
- set title
- if &term =~ '^screen'
- set t_ts=
- set t_fs=
- endif
- endif
- " stty on PuTTY does not generate ixany, while gnome-terminal does
- if &term =~ '^screen' || system('stty -F /dev/tty') !~ 'ixany'
- set background=dark
- endif
- set expandtab
- set ignorecase
- set number
- set showmatch
- set fileencodings=utf-8,euc-jp,sjis,iso-2022-jp,latin1
- set wildmode=list:longest
- augroup vimrc
- autocmd!
- autocmd FileType make setlocal noexpandtab
- autocmd FileType c call FT_c()
- autocmd FileType cpp call FT_c()
- autocmd FileType perl call FT_perl()
- autocmd FileType sh call FT_sh()
- autocmd FileType bash call FT_sh()
- if has("cscope") && filereadable("/usr/bin/cscope")
- autocmd VimResized * cscope reset
- endif
- augroup END
- function! FT_c()
- setlocal shiftwidth=4
- setlocal tabstop=8
- setlocal cindent
- endfunction
- function! FT_perl()
- setlocal noexpandtab
- setlocal shiftwidth=2
- setlocal tabstop=8
- setlocal cindent
- endfunction
- function! FT_sh()
- setlocal noexpandtab
- setlocal shiftwidth=2
- setlocal tabstop=8
- endfunction
- function! Kernel_source()
- setlocal noexpandtab
- setlocal shiftwidth=8
- endfunction
- if &term =~ "xterm"
- let &t_SI .= "\e[?2004h"
- let &t_EI .= "\e[?2004l"
- let &pastetoggle = "\e[201~"
- function XTermPasteBegin(ret)
- set paste
- return a:ret
- endfunction
- inoremap <special> <expr> <Esc>[200~ XTermPasteBegin("")
- endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement