-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.vim
76 lines (66 loc) · 1.61 KB
/
init.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
autocmd! bufwritepost ~/.config/nvim/init.vim source %
set clipboard=unnamed
let mapleader = ","
" Map `Enter` to insert new line
nmap <CR> o<Esc>
nmap <S-Enter> O<ESc>j
" Remap j/k to gj/gk to move lines virtually on wrapped text.
noremap <silent> <expr> j (v:count == 0 ? 'gj' : 'j')
noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k')
" unhighlight search
nnoremap <leader><space> :nohlsearch<CR>
nnoremap <leader>w :w<CR>
" toggle fold
nnoremap <space> za
" higlight last inserted text
nnoremap gV `[v`]
" Set relative Number
set relativenumber
set nocompatible
set hidden
set cursorline
filetype indent on
set wildmenu
set lazyredraw
set showmatch
set incsearch
set hlsearch
set foldenable
set foldlevelstart=10
set foldnestmax=10
set foldmethod=indent
syntax on
" Tabs and space config
set tabstop=2
set shiftwidth=2
set smarttab
set expandtab
set softtabstop=2
set autoindent
" Plugins
call plug#begin('~/.config/nvim/plugged')
" Plug 'morhetz/gruvbox'
Plug 'altercation/vim-colors-solarized'
Plug 'vim-airline/vim-airline'
Plug 'bronson/vim-trailing-whitespace'
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'terryma/vim-multiple-cursors'
Plug 'vim-ctrlspace/vim-ctrlspace'
Plug 'easymotion/vim-easymotion'
Plug 'tpope/vim-surround'
" Plug 'scrooloose/syntastic'
Plug 'scrooloose/nerdtree'
Plug 'tmhedberg/matchit'
" Plug 'sjl/gundo.vim'
Plug 'dracula/vim'
Plug 'editorconfig/editorconfig-vim'
call plug#end()
" appearance setting
" set background=dark
" let g:gruvbox_bold=1
" let g:gruvbox_contrast_dark="soft"
" let g:gruvbox_hls_cursor="orange"
" colorscheme gruvbox
color dracula
" hi Normal ctermbg=none