"----------------------------------------------------------------------------------
"-- 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 에서 많은 도움을 받았습니다.

 

My neovim settings: 나의 neovim 세팅을 공유합니다.

내가 vim 을 선호하는 가장 큰 이유 중 하나는 속도 이다. (간지라고는 말 못하니깐…) 그런데 최근 vim에 무분별하게 설치한 플러그인(…)때문에 속도가 조금 저하되는 문제가 발생하여 이것 저것 플러그인을 지..

seulcode.tistory.com