Skip to content

chameleon001/vim_setting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

" νŽΈλ¦¬ν•˜κ²Œ μ‚¬μš©ν• μˆ˜μžˆλ„λ‘ μ»€μŠ€ν…€μ„ ν•˜μ˜€λ‹€.

" λ²ˆλ“€ 생각보닀 λ§ŽκΈ΄ν•˜μ§€λ§Œ μ΄λ ‡κ²Œ ν–ˆμ„λ•Œ λΆˆνŽΈν•¨μ—†μ΄ νŽΈλ¦¬ν•˜κ²Œ μ“°λŠ”κ²ƒκ°™λ‹€.

γ…ˆγ…“γ…ˆγ…γ…‡γ…‡γ…›γ…‡

"========= default variables setting ========= set cindent set bg=dark set ruler " ν™”λ©΄ 우츑 ν•˜λ‹¨μ— ν˜„μž¬ μ»€μ„œμ˜ μœ„μΉ˜(쀄,μΉΈ)λ₯Ό 보여쀀닀. set number " 쀄 set modifiable set hlsearch " Highlight Search set ts=4 " tab stop - tab 크기 set sw=4 " shift width - shift 크기 쑰절 set sts=4 " soft tab stop - tab 이동 크기 set incsearch set ignorecase set printoptions=portrait:n,wrap:n,duplex:off set ai " auto indent set ignorecase " κ²€μƒ‰μ‹œ λŒ€μ†Œλ¬Έμž κ΅¬λ³„ν•˜μ§€μ•ŠμŒ set cindent " c style indent set si " smart indent set expandtab " tab λŒ€μ‹  λ„μ–΄μ“°κΈ°λ‘œ set fileencodings=utf-8,euc-kr " νŒŒμΌμΈμ½”λ”© ν˜•μ‹ μ§€μ • set bs=indent,eol,start " backspace ν‚€ μ‚¬μš© κ°€λŠ₯ set title " 제λͺ©μ„ ν‘œμ‹œ set showmatch " λ§€μΉ­λ˜λŠ” κ΄„ν˜Έλ₯Ό λ³΄μ—¬μ€Œ colorscheme torte "set nowrap " μžλ™ μ€„λ°”κΏˆ ν•˜μ§€ μ•ŠμŒ set nobackup "λ°±μ—… 파일 μ•ˆλ§Œλ“€κΈ° set wmnu " tab μžλ™μ™„μ„±μ‹œ κ°€λŠ₯ν•œ λͺ©λ‘μ„ λ³΄μ—¬μ€Œ set history=1000 " λͺ…령어에 λŒ€ν•œ νžˆμŠ€ν† λ¦¬λ₯Ό 1000κ°œκΉŒμ§€ set nocompatible " λ°©ν–₯ν‚€λ‘œ 이동가λŠ₯ highlight Comment term=bold cterm=bold ctermtg=2 ""주석 색깔변경"

syntax on

call vundle#begin() Plugin 'VundleVim/Vundle.vim' Plugin 'taglist-plus' plugin 'vim-airline/vim-airline'

" "plugin 'AutoComplPop' call vundle#end()

"========= vundle setting ========= set nocompatible " be iMproved filetype off " required!

"set rtp+=/.vim/bundle/vundle/ set rtp+=/.vim set rtp+=/.vim/bundle/Vundle.vim call vundle#begin('/.vim/bundle')

call vundle#rc()

" let Vundle manage Vundle " required! Bundle 'gmarik/vundle'

Bundle 'vim-airline/vim-airline' "μƒνƒœλ°”κ°„μ§€ "Bundle 'airblade/vim-gitgutter' "μ½”λ“œ λ³€κ²½ λ‚΄μ—­ ν•œλˆˆμ— " vim-scripts repos "Bundle 'ctrlpvim/ctrlp.vim' "Bundle 'tpope/vim-fugitive' κΉƒμ—°κ²° "

Bundle 'snipMate' Bundle 'L9' Bundle 'FuzzyFinder' Bundle 'The-NERD-tree' Bundle 'taglist.vim' Bundle 'bufexplorer.zip' Bundle 'DirDiff.vim' Bundle 'git://github.com/wesleyche/SrcExpl.git' "Bundle 'git://github.com/altercation/vim-colors-solarized.git' Bundle 'AutoComplPop' filetype plugin indent on " required! " " Brief help " :BundleList - list configured bundles " :BundleInstall(!) - install(update) bundles " :BundleSearch(!) foo - search(or refresh cache first) for foo " :BundleClean(!) - confirm(or auto-approve) removal of unused bundles " " see :h vundle for more details or wiki for FAQ " NOTE: comments after Bundle command are not allowed..

"========= key mapping ==========

map v]}zf "μ½”λ“œμ˜ { λΆ€λΆ„μ—μ„œ μ˜μ—­ μ ‘κΈ° map zo "μ˜μ—­ 펼치기 map :! gcc % -o %<.exe map :!%<.exe

map :BufExplorer

map map

"Vim λ‚΄μ˜ μ°½ 크기 쑰절 nmap < nmap - nmap + nmap >

"Vim λ‚΄μ—μ„œ μ°½ κ°„ 이동 nmap h nmap j nmap k nmap l

nmap :w nmap :browse e

"----------------------------- "Tag List config filetype on"vim filetpye on nmap :TlistToggle let Tlist_Ctags_Cmd="/usr/bin/ctags" let Tlist_Inc_Winwidth=0 let Tlist_Exit_OnlyWindow=0 "window close=off let Tlist_Auto_Open=0 let Tlist_Use_Right_Window=1 "-----------------------------"

"-----------------------------" "Source Explorer config "// The switch of the Source Explorer nmap :SrcExplToggle

" // Set the height of Source Explorer window let g:SrcExpl_winHeight = 8

" // Set 100 ms for refreshing the Source Explorer let g:SrcExpl_refreshTime = 100

" // Set "Enter" key to jump into the exact definition context " let g:SrcExpl_jumpKey = ""

" // Set "Space" key for back from the definition context let g:SrcExpl_gobackKey = ""

" // In order to Avoid conflicts, the Source Explorer should know what plugins " // are using buffers. And you need add their bufname into the list below " // according to the command ":buffers!" let g:SrcExpl_pluginList = [ \ "Tag_List", \ "NERD_tree", \ "Source_Explorer" \ ]

" // Enable/Disable the local definition searching, and note that this is not " // guaranteed to work, the Source Explorer doesn't check the syntax for now. " // It only searches for a match with the keyword according to command 'gd' let g:SrcExpl_searchLocalDef = 1

" // Do not let the Source Explorer update the tags file when opening let g:SrcExpl_isUpdateTags = 0

" // Use 'Exuberant Ctags' with '--sort=foldcase -R .' or '-L cscope.files' to " // create/update a tags file let g:SrcExpl_updateTagsCmd = "ctags --sort=foldcase -R ."

" // Set "" key for updating the tags file artificially let g:SrcExpl_updateTagsKey = ""

"-----------------------------"

set tags+=/root/kernel/linux-3.8.10/tags

"-----------------------------" "NERD Tree config let NERDTreeWinPos="left" let g:NERDTreeDirArrows=0 nmap :NERDTreeToggle "-----------------------------"

"========= switch between file buffers ======== map ,x :bn! " Switch to Next File Buffer map ,z :bp! " Switch to Previous File Buffer map ,w :bw " Close Current File Buffer

map ,1 :b!1 " Switch to File Buffer #1 map ,2 :b!2 " Switch to File Buffer #2 map ,3 :b!3 " Switch to File Buffer #3 map ,4 :b!4 " Switch to File Buffer #4 map ,5 :b!5 " Switch to File Buffer #5 map ,6 :b!6 " Switch to File Buffer #6 map ,7 :b!7 " Switch to File Buffer #7 map ,8 :b!8 " Switch to File Buffer #8 map ,9 :b!9 " Switch to File Buffer #9 map ,0 :b!0 " Switch to File Buffer #0

"========= ctags setting ======== "Upon vim open a file buffer, CWD is switched to the position of the current "file "autocmd BufEnter * silent! lcd %:p:h:gs/ /\/

"set tags=./tags;/.

if version >= 500

func! Sts() let st = expand("") exe "sts ".st endfunc nmap ,st :call Sts()

func! Tj() let st = expand("") exe "tj ".st endfunc nmap ,tj :call Tj()

func! Tn() exe "tn" endfunc nmap ,tn :call Tn()

func! Tp() exe "tp" endfunc nmap ,tp :call Tp()

func! Tr() exe "tr" endfunc nmap ,tr :call Tr()

func! Tl() exe "tl" endfunc nmap ,tl :call Tl()

endif

"======== cscope setting ======== set csprg=/usr/bin/cscope set csto=0 set cst

func! Csw() exe "cs show" endfunc nmap ,csw :call Csw()

func! Csc() let csc = expand("") new exe "cs find c ".csc if getline(1) == " " exe "q!" endif endfunc nmap ,csc :call Csc()

func! Csd() let csd = expand("") new exe "cs find d ".csd if getline(1) == " " exe "q!" endif endfunc nmap ,csd :call Csd()

func! Cse() let cse = expand("") new exe "cs find e ".cse if getline(1) == " " exe "q!" endif endfunc nmap ,cse :call Cse()

func! Csf() let csf = expand("") new exe "cs find f ".csf if getline(1) == " " exe "q!" endif endfunc nmap ,csf :call Csf()

func! Csg() let csg = expand("") new exe "cs find g ".csg if getline(1) == " " exe "q!" endif endfunc nmap ,csg :call Csg()

func! Csi() let csi = expand("") new exe "cs find i ".csi if getline(1) == " " exe "q!" endif endfunc nmap ,csi :call Csi()

func! Css() let css = expand("") new exe "cs find s ".css if getline(1) == " " exe "q!" endif endfunc nmap ,css :call Css()

func! Cst() let cst = expand("") new exe "cs find t ".cst if getline(1) == " " exe "q!" endif endfunc nmap ,cst :call Cst()

if filereadable("cscope.out") set nocsverb cs add cscope.out set csverb endif

"====,ma===== man page setting ============= func! Man() let sm = expand("") exe "!man -S 2:3:4:5:6:7:8:9:tcl:n:l:p:o ".sm endfunc nmap ,ma :call Man()

"====,mk===== make setting ============= let startdir = getcwd() func! Make() exe "!cd ".startdir exe "make" endfunc nmap ,mk :call Make()

"====,h====== hexViewer setting ============= let b:hexViewer = 0 func! Hv() if (b:hexViewer == 0) let b:hexViewer = 1 exe "%!xxd" else let b:hexViewer = 0 exe "%!xxd -r" endif endfunc nmap ,h :call Hv()

"============ file buffer CleanClose ============= func! CleanClose(tosave) if (a:tosave == 1) w! endif let todelbufNr = bufnr("%") let newbufNr = bufnr("#") if ((newbufNr != -1) && (newbufNr != todelbufNr) && buflisted(newbufNr)) exe "b".newbufNr else bnext endif

if (bufnr("%") == todelbufNr) new endif exe "bd".todelbufNr endfunc

nmap ,cf :call CleanClose(0)

"============ open CWD ============= nmap ,od :e ./

"============ project specific settings ============= if filereadable(".project.vimrc") source .project.vimrc endif

"========= solarized scheme ======= "syntax enable "set t_Co=256 "let g:solarized_termcolors=256 "colorscheme jellybeans "==================================

"======AutoComplPop ============= function! InsertTabWrapper() let col=col('.')-1 if !col||getline('.')[col-1]!~'\k' return "<TAB>" else if pumvisible() return "<C-M>" else return "<C-N><C-P>" end endif endfunction

inoremap =InsertTabWrapper()

hi Pmenu ctermbg=blue hi PmenuSel ctermbg=yellow ctermbg=black hi PmenuSbar ctermbg=blue "==================================

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors