-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
executable file
·77 lines (66 loc) · 1.24 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
76
77
" ----- Basic ------ "
set nocompatible
set mouse=a
set encoding=utf-8
set t_Co=256
set timeoutlen=300
" ----- Appearance ----- "
syntax on
set number
set relativenumber
set cursorline
set showmode
set showcmd
set textwidth=80
set wrap
set linebreak
set wrapmargin=2
set scrolloff=999
" set sidescrolloff=8
" set laststatus=2
set ruler
" ----- Indention ----- "
filetype indent on
set autoindent
set tabstop=4
set shiftwidth=4
set expandtab
set softtabstop=4
" ----- Search ----- "
set showmatch
set hlsearch
set incsearch
set ignorecase
set smartcase
" ----- Edit ----- "
set nobackup
set noswapfile
set undofile
set noerrorbells
" set visualbell
set history=1000
set autoread
" Show extra tabs or spaces in the end of a line
set listchars=tab:»■,trail:■
set list
" Completion for command
set wildmenu
set wildmode=longest:list,full
" ----- Keybindings ----- "
" Leader Key
let mapleader = " "
" ==== Normal Mode ==== "
nnoremap <leader>n :nohlsearch<CR>
nnoremap <C-s> <ESC>:w<CR>
nnoremap <leader>= gg=G
nnoremap <leader>qq :qa<CR>
nnoremap <C-a> ggVG"+y
nnoremap <C-x> ggVGc
nnoremap j gj
nnoremap k gk
" ==== Insert Mode ==== "
inoremap <C-s> <ESC>:w<CR>
inoremap jk <ESC>
inoremap kj <ESC>
inoremap {<CR> {<CR>}<ESC>O
" ==== Visual Mode ==== "