Last active
November 15, 2020 05:13
-
-
Save suhdonghwi/fe12300eed3911bc3f99bbf77ab4cf21 to your computer and use it in GitHub Desktop.
neovim config file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" General | |
let mapleader=" " | |
set number " Show absolute line number for current line | |
set relativenumber " Show relative line number for other lines | |
set linebreak " Break lines at word (requires Wrap lines) | |
set showbreak=+++ " Wrap-broken line prefix | |
set textwidth=100 " Line wrap (number of cols) | |
set showmatch " Highlight matching brace | |
set visualbell " Use visual bell (no beeping) | |
set hlsearch " Highlight all search results | |
set smartcase " Enable smart-case search | |
set ignorecase " Always case-insensitive | |
set incsearch " Searches for strings incrementally | |
set autoindent " Auto-indent new lines | |
set expandtab " Use spaces instead of tabs | |
set shiftwidth=2 " Number of auto-indent spaces | |
set smartindent " Enable smart-indent | |
set smarttab " Enable smart-tabs | |
set softtabstop=2 " Number of spaces per Tab | |
set ruler " Show row and column ruler information | |
set cmdheight=2 " Give more spaces for error messages displaying | |
set hidden | |
set nobackup | |
set nowritebackup | |
set updatetime=300 | |
set shortmess+=c | |
set undolevels=1000 | |
set undofile | |
tnoremap <Esc> <C-\><C-n> | |
inoremap <C-c> <Esc> | |
nnoremap <Leader>wh <C-w>h | |
nnoremap <Leader>wj <C-w>j | |
nnoremap <Leader>wk <C-w>k | |
nnoremap <Leader>wl <C-w>l | |
""" Plugins | |
call plug#begin('~/.vim/plugged') | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'justinmk/vim-sneak' | |
Plug 'machakann/vim-sandwich' | |
Plug 'gruvbox-community/gruvbox' | |
Plug 'itchyny/lightline.vim' | |
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
Plug 'junegunn/fzf.vim' | |
" Use release branch (Recommend) | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'sheerun/vim-polyglot' | |
Plug 'tpope/vim-fugitive' | |
Plug 'mhinz/vim-signify' | |
call plug#end() | |
""" Appearance | |
colorscheme gruvbox | |
highlight VertSplit cterm=NONE | |
highlight clear SignColumn | |
""" Plug: NERDTree | |
nnoremap <Leader>nt :NERDTreeToggle<CR> | |
autocmd FileType nerdtree setlocal signcolumn=no | |
""" Plug: lightline.vim | |
let g:lightline = { | |
\ 'colorscheme': 'gruvbox', | |
\ } | |
""" Plug: vim-sneak | |
let g:sneak#label = 1 | |
""" Plug: fzf.vim | |
let g:fzf_colors = | |
\ { 'fg': ['fg', 'Normal'], | |
\ 'bg': ['bg', 'Normal'], | |
\ 'hl': ['fg', 'Comment'], | |
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], | |
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], | |
\ 'hl+': ['fg', 'Statement'], | |
\ 'info': ['fg', 'PreProc'], | |
\ 'border': ['fg', 'Ignore'], | |
\ 'prompt': ['fg', 'Conditional'], | |
\ 'pointer': ['fg', 'Exception'], | |
\ 'marker': ['fg', 'Keyword'], | |
\ 'spinner': ['fg', 'Label'], | |
\ 'header': ['fg', 'Comment'] } | |
nnoremap <Leader>fg :GitFiles<CR> | |
nnoremap <Leader>ff :FZF<CR> | |
""" Plug: coc.nvim | |
nnoremap <Leader>ch :call CocAction('doHover')<CR> | |
nnoremap <Leader>cf :call CocAction('format')<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment