변군이글루

[기타] vim 에디터 환경 설정 파일 본문

프___기타

[기타] vim 에디터 환경 설정 파일

변군 변군이글루 2017.02.17 11:17

vim 에디터 환경 설정 파일

# vi .vimrc
" Arcy's vim environment (based on perky's)

let g:Arcy="3.7"

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

" 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>=2P
set <S-F2>=2Q
set <S-F3>=2R
set <S-F4>=2S

"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-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

참고 URI : https://medium.com/sunhyoups-story/vim-%EC%97%90%EB%94%94%ED%84%B0-%EC%9D%B4%EC%81%98%EA%B2%8C-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0-5b6b8d546017#.7povvxng7

 

0 Comments
댓글쓰기 폼