-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvimrc
69 lines (51 loc) · 1.51 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
"""""""""""""""""""""""""""
" Zepp's modification "
"""""""""""""""""""""""""""
" ==> General
set wildmenu "zsh like Tab key view
" Alt key mapping issue
" Also brings another issue: have to wait for a while after <C-[>
"execute "set <M-h>=\eh"
"execute "set <M-l>=\el"
"set fileencodings=utf-8,ucs-bom,gbk,cp936,gb18030,gb2312
"set encoding=utf-8
" ==> Appearance
set number "line number
set wrap "auto wrap long lines
set linebreak "wrap lines according to spaces
set tabstop=4
set shiftwidth=4
syntax on
colorscheme ron
highlight Comment ctermfg=darkgrey
highlight LineNr ctermfg=darkgrey
" ==> Edit
filetype plugin on
filetype indent on
" Auto read when file changed
set autoread
" :W to sudo saves the file
command W w !sudo tee % > /dev/null
command Q qa
" Moving up and down quicker
set scrolloff=7
" Tab operations
" Ctrl-h/l to switch tab
" n: normal mode; noremap: maps, but not recursively
nnoremap <C-h> gT
nnoremap <C-l> gt
inoremap <C-h> <esc>gT
inoremap <C-l> <esc>gt
" <CR>: carriage return, means an enter hit
"nnoremap <silent> <C-A-h> :execute 'silent! tabmove ' . (tabpagenr()-2)<CR>
"nnoremap <silent> <C-A-l> :execute 'silent! tabmove ' . (tabpagenr()+1)<CR>
" auto reload
set autoread
" odd extensions
autocmd BufNewFile,BufRead *.launch set filetype=xml
autocmd BufNewFile,BufRead *.urdf set filetype=xml
autocmd BufNewFile,BufRead *.urdf.xacro set filetype=xml
autocmd BufNewFile,BufRead *.world set filetype=xml
" ==> Search
set ignorecase "Case insensitive search
set incsearch "Real time search