-
Notifications
You must be signed in to change notification settings - Fork 0
/
.xvimrc
39 lines (32 loc) · 913 Bytes
/
.xvimrc
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
" search
" highlight matched
set hlsearch
" enable incremental search
set incsearch
" turn off highlighting with ESCx2
nnoremap <C-g><C-g> :nohl<CR>
nnoremap <ESC><ESC> :nohl<CR>
" case insensitive
set ignorecase
" change highlight color
:highlight Search guibg=blue
" tab operations
nnoremap <C-h> :xccmd selectPreviousTab<CR>
nnoremap <C-l> :xccmd selectNextTab<CR>
nnoremap st :xccmd newTab<CR>
" history operations
" (you must disable predefined keymap for C-i and C-o in XCode preference)
nnoremap <C-i> :xccmd goBackInHistoryByCommand<CR>
nnoremap <C-o> :xccmd goForwardInHistoryByCommand<CR>
# window operations
nnoremap sj <C-w>j
nnoremap sk <C-w>k
nnoremap sh <C-w>h
nnoremap sl <C-w>l
" single stroke to write file
nnoremap gw :w<CR>
" CR to insert new line
nnoremap <CR> o<C-o>0<C-o>d$<ESC>
nnoremap <S-CR> O<C-o>0<C-o>d$<C-o>j<ESC>
" Space to insert space
nnoremap <Space> i<Space><ESC><Right>