변군이글루

[리눅스] .vimrc 본문

서___리눅스

[리눅스] .vimrc

변군 변군이글루 2015.12.30 15:36

 

" Arcy's vim environment (based on perky's)

 

let g:Arcy="3.11"

 

set nocompatible

"set fileformat=unix

set formatoptions=tcql

set ai

"set laststatus=2

"set wrapmargin=2

set visualbell

set mat=3 showmatch

"set term=xterm

"set nu

 

set bs=2                " allow backspacing over everything in insert mode

set nobackup          " do not keep a backup file, use versions instead

 

set viminfo='20,\"50    " read/write a .viminfo file, don't store more

                        " than 50 lines of registers

set history=100         " keep 50 lines of command line history

set ruler               " show the cursor position all the time

 

set list lcs=tab:\|.,trail:~    " display tab as >------, and trail as ~

 

set fencs=cp949,euc-kr,utf-8,ucs-bom,latin1

 

set incsearch           " incremental searching

set ignorecase smartcase

 

set wildmenu

 

if v:version >= 703

  let undodir=$HOME."/.vim/undo"

  if !isdirectory(undodir)

    call mkdir(undodir, "p")

  endif

  set undofile                " Save undo's after file closes

  set undodir=$HOME/.vim/undo " where to save undo histories

  set undolevels=1000         " How many undos

  set undoreload=10000        " number of lines to save for undo

endif

 

" 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

 

" Force encoding as UTF-8, in cygwin ssh enviroment

if stridx(&term, "xterm") >= 0 && stridx($USERDOMAIN, "NT AUTHORITY") >= 0

  set enc=utf-8

endif

 

" Update function

if has("eval")

  fun! Updateit()

    winc n

    ,!uname -s

    yank

    undo

    winc c

    let os = @

    if stridx(os, "FreeBSD") >= 0

      !fetch -o ~/.vimrc http://arcy.org/.vimrc

    "elseif stridx(os, "Linux") >= 0

    else

      !wget -O ~/.vimrc http://arcy.org/.vimrc

    endif

  endfun

endif

 

set background=dark

 

set <S-F1>=O2P

set <S-F2>=O2Q

set <S-F3>=O2R

set <S-F4>=O2S

 

map <S-F1> :echo "Arcy's environment version " g:Arcy<cr>

map <S-F2> :call Updateit()<CR>:source ~/.vimrc<CR>

map <F4> :up<cr>

imap <F4> <ESC>:up<CR>a

map <S-F4> :q<cr>

map <F9> :cp<cr>

map <F10> :cn<cr>

map <S-F9> :bp<cr>

map <S-F10> :bn<cr>

map <F11> :N<cr>

map <F12> :n<cr>

map <S-F11> :tN<cr>

map <S-F12> :tn<cr>

map <C-j> <C-w>j

map <C-k> <C-w>k

map <C-h> <C-w>h

map <C-l> <C-w>l

map <C-n> <C-w>n

map <C-;> :redr!<cr>

map <C-i> :tabprev<cr>

map <C-p> :tabnext<cr>

map <C-m> :tabnew<cr>

 

"map D o/*<cr> * <cr>*/<esc>ka

 

 

au BufNewFile,BufRead *.c          set si

au BufNewFile,BufRead *.php        set si et sw=4 sts=4

au BufNewFile,BufRead *.py         set si et sw=4 sts=4

au BufNewFile,BufRead *.html,*.css set sw=8 sts=8 noet

au BufNewFile,BufRead *.js         set et sw=2 sts=2

au BufNewFile,BufRead *.rdf        set et sw=2 sts=2

 

 

" Load local config

if filereadable($HOME."/.vimrc.local")

  source $HOME/.vimrc.local

endif

 

출처 : http://arcy.org/.vimrc

0 Comments
댓글쓰기 폼