-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoj.vim
More file actions
40 lines (40 loc) · 836 Bytes
/
oj.vim
File metadata and controls
40 lines (40 loc) · 836 Bytes
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
source /etc/vimrc
set nu "num line
set tabstop=4
set shiftwidth=4
set cindent
set smarttab
set expandtab "set tab to space
set autoindent
syntax on
"hi comment ctermfg=cyan
hi comment ctermfg=blue
"prefer ^
"let comment color be blue. instead of dark blue
"super TAB
function InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\<tab>"
else
return "\<c-p>"
endif
endfunction
inoremap <TAB> <C-R>=InsertTabWrapper()<CR>
"my rc
imap jk <ESC>
let mapleader = "\<Space>"
nmap <Leader>r :<C-P><CR>
nmap <Leader>x :x<CR>
nmap <Leader>w :w<CR>
nmap <Leader>q :q<CR>
nmap <Leader>n :n<CR>
nmap <Leader>N :N<CR>
nmap <Leader>jq :q!<CR>
nmap <Leader>/ :noh<CR>
nmap <Leader>; :
nmap <Leader>= mcHmhLmlgg=G`h`l`c
noremap H ^
noremap L $
set clipboard=unnamedplus
set hlsearch