-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
executable file
·76 lines (61 loc) · 1.23 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
set nocompatible
filetype on
filetype plugin indent on
filetype indent on
set showcmd
if $TERM == "xterm-256color"
set t_Co=256
endif
syntax on
set number
set ruler
set cursorline
set wildmenu
set lazyredraw
set showmatch
" Tab config
set tabstop=4
set textwidth=80
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent
set smarttab
" Search config
set incsearch
set hlsearch
" Move vertically by visual line
nnoremap j gj
nnoremap k gk
" Move to beginning/end of the line
nnoremap B ^
nnoremap E $
nnoremap $ <nop>
nnoremap ^ <nop>
" Matching braces and etc.
"inoremap { {<CR>}<Esc>ko
inoremap { {}<Esc>i
inoremap ( ()<Esc>i
inoremap " ""<Esc>i
inoremap /* /* */<Esc>hh
" Leader shortcuts
nnoremap <SPACE> <Nop>
let mapleader="\<SPACE>" "Leader is comma
inoremap jk <esc>
set laststatus=2
set ttimeoutlen=50
" BUFFER CONFIG
nmap <leader>l :bnext<CR>
nmap <leader>h :bprev<CR>
" VIM AESTHETIC
hi LineNr ctermfg=black
hi CursorLineNR ctermfg=white
hi VertSplit cterm=bold ctermfg=white
" SOME MORE REMAPS
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" HTML CONFIG
autocmd FileType html setlocal shiftwidth=2 tabstop=2