Revisions

gist: 220441 Download_button fork
public
Public Clone URL: git://gist.github.com/220441.git
Embed All Files: show embed
VimL #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
" vim: fileencoding=utf8
set termencoding=utf-8
scriptencoding utf8
set nocompatible
set backspace=indent,eol,start
set ru showcmd showmatch
set incsearch
set nowrap
set iminsert=0 imsearch=0
set expandtab softtabstop=2 shiftwidth=2
set fileencoding=utf8
set fileencodings=ucs-bom,utf8,prc
set guioptions-=T
set wildmenu
set nobackup
syn sync minlines=1000
 
autocmd FileType c\|cpp set noet sts=4 ts=8 sw=4
 
" Ctrl-X is Cut
vnoremap <C-X> "+x
" Ctrl-C is Copy
vnoremap <C-C> "+y
 
if has("gui_running")
  if has("gui_gtk2")
    set guifont=Bitstream\ Vera\ Sans\ Mono\ 8
  elseif has("win32")
" I do not know why, but size 9 of Osaka-等幅
" is not antialiased so more readable
    set guifont=Osaka-等幅:h9:cSHIFTJIS
  endif
endif
 
" The stuff bellow comes from vimrc_example.vim
 
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
  syntax on
  set hlsearch
endif
 
" Only do this part when compiled with support for autocommands.
if has("autocmd")
 
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
  filetype plugin indent on
 
" Put these in an autocmd group, so that we can delete them easily.
  augroup vimrcEx
  au!
 
" For all text files set 'textwidth' to 78 characters.
  autocmd FileType text setlocal textwidth=78
 
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
" Also don't do it when the mark is in the first line, that is the default
" position when opening a file.
  autocmd BufReadPost *
    \ if line("'\"") > 1 && line("'\"") <= line("$") |
    \ exe "normal! g`\"" |
    \ endif
 
  augroup END
else
  set autoindent " always set autoindenting on
endif " has("autocmd")