-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
75 lines (59 loc) · 1.15 KB
/
.vimrc
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
call plug#begin('~/.vim/plugged')
Plug 'arcticicestudio/nord-vim'
Plug 'Lokaltog/vim-easymotion'
Plug 'tpope/vim-surround'
call plug#end()
filetype plugin indent on
syntax enable
set background=dark
set termguicolors
colorscheme nord
" options
set clipboard=unnamed,autoselect
set encoding=utf8
set number
set mouse=a
set cursorline
set nowrap
" indent
set autoindent
set smartindent
set smarttab
set expandtab
set tabstop=4
set shiftwidth=4
" search
set hlsearch
set incsearch
set ignorecase
set smartcase
set wrapscan
" swap file
set directory=~/.vim/tmp
" keymap
let mapleader = "\<Space>"
noremap , :
" quit insert mode
inoremap jj <Esc>
" move window
nnoremap sj <C-w>j
nnoremap sk <C-w>k
nnoremap sl <C-w>l
nnoremap sh <C-w>h
nnoremap <Esc><Esc> :noh<CR>
" split window
nnoremap ss :<C-u>sp<CR>
nnoremap sv :<C-u>vs<CR>
" tab page
nnoremap sn gt
nnoremap sp gT
nnoremap st :<C-u>tabnew<CR>
" write file
nnoremap <Leader>w :w<CR>
nnoremap <Leader>q :wq<CR>
" vim-easymotion
let g:EasyMotion_do_mapping=0
let g:EasyMotion_smartcase=1
nmap f <plug>(easymotion-overwin-f2)
" Turn off paste mode when leaving insert
autocmd InsertLeave * set nopaste