"----------------------------------------------------------------------------------
"-- config
"----------------------------------------------------------------------------------
" set UTF-8 encoding
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
set hlsearch "highlight searching result
set ignorecase "ignore Case sensitive when searching
set history=1000 "store :cmd history
set relativenumber "show relative number from current line
set cursorline "highlight cursor line
set mouse=h "Enable mouse in help mode
set wrap
syntax sync minlines=200 "For speed up vim
set clipboard=unnamed "yank, paste to system clipboard
set nocompatible " disable vi compatibility (emulation of old bugs)
set autoindent " use indentation of previous line
set smartindent " use intelligent indentation for C
" configure tabwidth and insert spaces instead of tabs
set tabstop=4 " tab width is 4 spaces
set shiftwidth=4 " indent also with 4 spaces
set expandtab " expand tabs to spaces
" wrap lines at 120 chars. 80 is somewaht antiquated with nowadays displays.
set textwidth=120
" colorscheme wombat256
set t_Co=256
" turn syntax highlighting on
syntax on
set number " turn line numbers on
set showmatch " highlight matching braces
set comments=sl:/*,mb:\ *,elx:\ */ " intelligent comments
"----------------------------------------------------------------------------------
"-- keyboard mappings
"----------------------------------------------------------------------------------
" Keep undo history across sessions, by storing in file.
silent !mkdir ~/.config/nvim/backups > /dev/null 2>&1
set undodir=~/.config/nvim/backups
set undofile
"----------------------------------------------------------------------------------
"-- keyboard mappings
"----------------------------------------------------------------------------------
" switch between header/source with F4
map <F4> :e %:p:s,.h$,.X123X,:s,.cpp$,.h,:s,.X123X$,.cpp,<CR>
" goto definition with F12
map <F12> <C-]>
"----------------------------------------------------------------------------------
"-- plugins
"----------------------------------------------------------------------------------
call plug#begin('~/.config/nvim/plugged')
" Use release branch
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Or latest tag
Plug 'neoclide/coc.nvim', {'tag': '*', 'branch': 'release'}
" Or build from source code by use yarn: https://yarnpkg.com
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
Plug 'nightsense/simplifysimplify'
Plug 'wakatime/vim-wakatime' "check coding time
Plug 'scrooloose/nerdtree'
Plug 'jistr/vim-nerdtree-tabs' "Toggle nerd tree with one key
Plug 'mattn/emmet-vim' "Trigger: <C-y><leader>
Plug 'jiangmiao/auto-pairs' "Auto pair for ',), }, ]...
Plug 'airblade/vim-gitgutter' "Show git status in vim
Plug 'ctrlpvim/ctrlp.vim' "Ctrl + P for search file
Plug 'mhinz/vim-startify' "fancy start page for empty vim
Plug 'iCyMind/NeoSolarized'
call plug#end()
"----------------------------------------------------------------------------------
"-- plugin config
"----------------------------------------------------------------------------------
" ----- NeoSolarized -----
"colorscheme NeoSolarized
"
set background=dark
"----- Nerd Tree -----
map nt <ESC>:NERDTreeToggle<CR>
"map nt <ESC>:NERDTree<CR>
일단 이렇게 쓰다가 추후 나에게 맞게 수정할 예정입니다.
https://seulcode.tistory.com/272 에서 많은 도움을 받았습니다.
'개발환경' 카테고리의 다른 글
Mac Os에서 Tmux 설치 & 사용법 (0) | 2020.02.09 |
---|---|
Mac Os에서 ctags 설치 & 사용법 (0) | 2020.02.09 |
MacOs10.14에서 neovim과 coc.nvim으로 python 개발환경 만들기 (1) | 2020.02.09 |
Homebrew의 bundle로 Mac한번에 셋팅하기 (0) | 2019.11.11 |
Homebrew Cask 설치하기 (0) | 2019.11.11 |