Skip to content

Instantly share code, notes, and snippets.

@hsnks100
Last active March 5, 2016 16:16
Show Gist options
  • Save hsnks100/bce0897d245818dd4de3 to your computer and use it in GitHub Desktop.
Save hsnks100/bce0897d245818dd4de3 to your computer and use it in GitHub Desktop.
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
filetype plugin indent on " required
" 기본 무시 설정
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/](\.(git|hg|svn)|\_site)$',
\ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$',
\}
let g:airline#extensions#tabline#enabled = 1
"nmap _ :call NERDComment(0, "toggle")<CR>
"vmap _ :call NERDComment("x", "toggle")<CR>
let $PATH .= ';C:\Program Files (x86)\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;'
" 가장 가까운 .git 디렉토리를 cwd(현재 작업 디렉토리)로 사용
" 버전 관리를 사용하는 프로젝트를 할 때 꽤 적절하다.
" .svn, .hg, .bzr도 지원한다.
let g:ctrlp_working_path_mode = 'r'
"map <leader>b :Bufstop<CR> " get a visual on the buffers
syntax on
set number " line 표시를 해줍니다.
set laststatus=2
set cmdheight=2
set cursorline
set shortmess=atI
set nu
set tabstop=4
set shiftwidth=4
set smarttab
set smartindent
set foldenable
set mouse=a
set foldmethod=indent
set foldnestmax=2
set foldlevel=1
set ignorecase
set smartcase
"set ai " auto index
"set si " smart index
"set cindent " c style index
set ignorecase " 검색시 대소문자 구별하지않음
set hlsearch " 검색시 하이라이트(색상 강조)
set nocompatible " 방향키로 이동가능
set bs=indent,eol,start " backspace 키 사용 가능
set history=1000 " 명령어에 대한 히스토리를 1000개까지
set ruler " 상태표시줄에 커서의 위치 표시
set nobackup " 백업파일을 만들지 않음
set title " 제목을 표시
set showmatch " 매칭되는 괄호를 보여줌
set nowrap " 자동 줄바꿈 하지 않음
set wmnu " tab 자동완성시 가능한 목록을 보여줌
set autochdir
set noerrorbells visualbell t_vb=
set hidden
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
set ts=4
set sw=4
set sts=4
if has('autocmd')
autocmd GUIEnter * set visualbell t_vb=
endif
let mapleader=","
colorscheme darkblue
nmap <C-j> :bn<CR>
nmap <C-k> :bp<CR>
inoremap <C-h> <C-o>h
inoremap <C-l> <C-o>l
imap jj <ESC>j
imap kk <ESC>k
nmap <SPACE> i<SPACE><ESC>
nmap <CR> i<CR><ESC>
vnoremap p "_dP
nnoremap x "_x
inoremap <C-e> <C-x><C-e>
inoremap <C-y> <C-x><C-y>
noremap YY :%y+<CR>
vnoremap Y "+y
vnoremap <C-C> :"+y<CR>
inoremap <C-V> <ESC>"+p<CR>i
nnoremap d) %x<C-o>x "괄호 쌍 지우기.
"compile setting
autocmd FileType cpp setlocal makeprg=g++\ -std=c++11\ %:r.cpp\ -o\ %<.exe
autocmd FileType pl,perl setlocal makeprg=perl\ %\ <input.txt
autocmd FileType py,python setlocal makeprg=python\ %\ <input.txt
noremap <C-S-B> :wa<CR>:make<CR>:cope<CR><C-w>p
autocmd FileType cpp noremap <buffer> <C-F5> :cexpr system(expand('%:r') .'< input.txt')<CR>:cope<CR><C-w>p
autocmd FileType cpp noremap _ :norm i//<CR>
autocmd FileType cpp noremap + :norm ^xx<CR>
"noremap <F5> :wa<CR>:make<CR>
"noremap <C-F5> :! %<.exe < input.txt<CR>
"autocmd FileType cpp set makeprg=g++\ -std=c++11\ %:r.cpp\ -o\ %<.exe
"noremap <F9> :call Run()<CR>
"inoremap <F9> <ESC>:call Run()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment