-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
79 lines (61 loc) · 2.36 KB
/
vimrc
File metadata and controls
79 lines (61 loc) · 2.36 KB
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
78
set nocompatible " be iMproved, required
filetype off " required
filetype plugin indent on " required
syntax enable " Enable syntax highlight
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Set mapleader
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let mapleader=","
let g:mapleader=","
let maplocalleader=","
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" For vimrc editing
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
nnoremap <leader>s :source $MYVIMRC<CR>
nnoremap <leader>e :vsplit $MYVIMRC<CR>
if has ("autocmd")
autocmd! BufWritePost .vimrc source $MYVIMRC
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Remap Esc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
inoremap jk <Esc>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Motion
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set ruler " Always show current position
set backspace=indent,eol,start " Set backspace
set whichwrap+=h,l " Let h,l to cross line
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Text options
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set expandtab
set shiftwidth=4
set tabstop=4
set softtabstop=4
set smarttab
set lbr
set number
set list listchars=tab:>-,trail:- " Make space and tab visible
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Indent
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set autoindent
set smartindent
set nowrap
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Search
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set hlsearch " Highlight search things
set incsearch " Do incremental searching
set ignorecase
set smartcase
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Misc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
nnoremap <F4> :bd!<CR> " Close Buffer
set showmatch " Show mathing bracets
set mat=2 " How many tenths of a second to blink
" Set status line
set laststatus=2
set statusline=[%f][%{&ff}][%Y]%k[%{(&fenc==\"\")?&enc:&fenc}%{(&bomb?\",BOM\":\"\")}][%{strftime('%y-%m-%d-%H:%M\ %a')}]%=[Line:%l/%L,Column:%c%V]\ %P