Skip to content

Instantly share code, notes, and snippets.

@siisee11
Created December 1, 2019 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siisee11/e44e8ca3d1500e32d08dc3f40e6ec410 to your computer and use it in GitHub Desktop.
Save siisee11/e44e8ca3d1500e32d08dc3f40e6ec410 to your computer and use it in GitHub Desktop.
myvimrc
"=========Vundel============
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
"============주석==========
func! CmtOn() "주석 on
exe "'<,'>norm i//"
endfunc
func! CmtOff() "주석 off
exe "'<,'>norm 2x"
endfunc
vmap <c-j> <esc>:call CmtOn() <cr>
vmap <c-x> <esc>:call CmtOff() <cr>
nmap <c-j> <esc>v:call CmtOn() <cr>
nmap <c-x> <esc>v:call CmtOff() <cr>
"================================================================
set ruler
set wrap
set number " 라인번호를 붙임
set tabstop=4 " 탭문자는 4컬럼 크기로 보여주기
set shiftwidth=4 " 문단이나 라인을 쉬프트할 때 4컬럼씩 하기
set autoindent " 자동 들여쓰기
syntax on " 적절히 Syntax에 따라 하일라이팅 해주기
set cindent " C 언어 자동 들여쓰기
set showmatch " 매치되는 괄호의 반대쪽을 보여줌
set title " 타이틀바에 현재 편집중인 파일을 표시
set smartindent " 좀더 똑똑한 들여쓰기를 위한 옵션이다.
set ignorecase
set incsearch
set showcmd
set nowrap
set laststatus=2
set autoindent " 자동으로 들여쓰기를 한다.
set ts=4 "탭 간격 조절
set sw=4
set hlsearch "검색어 강조 기능을 사용합니다.
:set cursorline
syntax enable
highlight Comment term=bold cterm=bold ctermfg=6
"이건 주석의 색깔을 지정. 2는 초록
map ,1 :b!1<CR>
map ,2 :b!2<CR>
map ,3 :b!3<CR>
map ,4 :b!4<CR>
map ,5 :b!5<CR>
map ,6 :b!6<CR>
map ,7 :b!7<CR>
map ,8 :b!8<CR>
map ,9 :b!9<CR>
map ,0 :b!0<CR>
nmap <F7> :NERDTreeToggle<CR>
nmap <c-c> <esc>:w<CR><esc><c-z>
"==== taglist ====
let Tlist_Use_Right_Window=1
let Tlist_Auto_Open=0
nmap <F8> :Tlist<CR>
"=====================ctags 설정 ============
set tags=./tags ",/usr/src/tags
if version >= 500
func! Sts( )
let st = expand("<cword>")
exe "sts ".st
endfunc
nmap ,st :call Sts( )<cr>
func! Tj( )
let st = expand( "<cword>")
exe "tj ".st
endfunc
nmap ,tj :call Tj( )<cr>
endif
"==================== cscope 설정 ========
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
if filereadable("./cscope.out")
cs add cscope.out
else
cs add /usr/src/linux/cscope.out
endif
set csverb
":colorscheme evening
au BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "norm g`\"" |
\ endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment