-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.vim
More file actions
61 lines (52 loc) · 1.17 KB
/
Copy pathinit.vim
File metadata and controls
61 lines (52 loc) · 1.17 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
" --- General --- "
let mapleader = " "
set number
" System clipboard
if has('macunix')
nnoremap <Leader>c "*yy
xnoremap <Leader>c "*y
nnoremap <Leader>v "*p
else
nnoremap <Leader>c "+yy
xnoremap <Leader>c "+y
nnoremap <Leader>v "+p
endif
" tab gestion
set autoindent
nnoremap <Tab> >>_
nnoremap <S-Tab> <<_
xnoremap <Tab> >
xnoremap <S-Tab> <
set noshowmode
set hlsearch
set ignorecase
" --- Remap --- "
nnoremap ; :
nnoremap , @
nnoremap U <C-r>
" Double o
nnoremap <Leader>o o<Esc>o
" Go to previous cursor position
nnoremap <Leader>b <C-o>
" Format current paragraph
nnoremap <Leader>z gqip
" Toogle fold
nnoremap ff za
" Put the underliying word in lower/upper case
nnoremap <Leader>u guiw
nnoremap <Leader>U gUiw
" Add a semicolon to the current line without moving the cursor with <Leader>;
nnoremap <Leader>; m'A;<ESC>`'
" To move faster
nnoremap J 5j
nnoremap K 5k
xnoremap J 5j
xnoremap K 5k
" To move between split
nnoremap <leader>h <C-w>h
nnoremap <leader>j <C-w>j
nnoremap <leader>k <C-w>k
nnoremap <leader>l <C-w>l
" Replace inner word in the entire file
nnoremap <Leader>r :%s/\<<C-r><C-w>\>//g<Left><Left>
xnoremap <Leader>r :s//g<Left><Left>