Created
July 30, 2009 04:36
-
-
Save nagachika/158552 to your computer and use it in GitHub Desktop.
Vim settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
set noerrorbells | |
set backup | |
set backupdir=.backup,~/.vimbackup | |
set keywordprg=man | |
"set number | |
set ruler | |
set showmode | |
set showmatch | |
set ignorecase | |
set smartcase | |
set tabstop=8 | |
set softtabstop=2 | |
set shiftwidth=2 | |
set scrolloff=5 | |
set expandtab | |
set autoindent | |
set backspace=2 | |
set history=100 | |
set textwidth=80 | |
set nowrap | |
set hidden | |
set background=light ft=vim syn=vim | |
"set background=dark ft=vim syn=vim | |
set ttyfast | |
set mousehide | |
set wildmode=longest,list,full | |
set shortmess=o | |
set suffixes=.bak,~,.info,.swp,.class | |
set wildignore=~,*.o,*.info,*.swp,*.class | |
set makeprg=make | |
set tags=./tags,../tags,../*/tags,../../tags | |
set path+=/usr/include,../h/ | |
" viminfo | |
" ' file number | |
" f global marks | |
" \" registers | |
" : command lines | |
" @ input lines | |
" / search commands | |
" | |
set viminfo='100,f1,\"500,n~/.viminfo | |
au BufReadPost * if line("'\"") > 0 | if line("'\'") < line("$") | exe("norm '\"") | else | exe "norm $" | endif | endif | |
set showmatch | |
"set ignorecase " Do case insensitive matching | |
set wildmenu | |
set incsearch | |
set hlsearch " highlight search strings " | |
map <silent> ,g :let efsave=&ef<Bar>let &ef=tempname()<Bar>exe ':!grep -n -w "<cword>" ../*/*.[ch] ../*/*.txt >'.&ef<CR>:cf<CR>:exe ":!rm ".&ef<CR>:let &ef=efsave<Bar>unlet efsave<CR><CR>:cc<CR> | |
map <silent> <C-N> :cn | |
map <silent> <C-P> :cp | |
map mm :make<space> | |
map ,m :make<Up> <CR> | |
set isfname-== | |
set list | |
set listchars=tab:>-,extends:<,trail:-,eol:< | |
set laststatus=2 | |
set cmdheight=1 | |
set showcmd | |
set title | |
set shell=$SHELL | |
if has("syntax") | |
syntax on | |
endif | |
set fileencoding=japan | |
set encoding=japan | |
set termencoding=japan | |
filetype plugin indent on | |
" spell check | |
iab unsinged unsigned | |
iab retrun return | |
" C indent setting | |
set cinoptions=^s,t0,(0,)300,*300,:0 | |
if has("autocmd") | |
" Set some sensible defaults for editing C-files | |
augroup cprog | |
" Remove all cprog autocommands | |
au! | |
" When starting to edit a file: | |
" For *.c and *.h files set formatting of comments and set C-indenting on. | |
" For other files switch it off. | |
" Don't change the order, it's important that the line with * comes first. | |
autocmd BufRead *.c,*.h set formatoptions=croql cindent noexpandtab shiftwidth=4 comments=sr:/*,mb:*,el:*/,:// | |
augroup END | |
endif " has ("autocmd") | |
"colorscheme elflord | |
colorscheme darkblue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment