-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfamiliar_mode_vimrc.vim
More file actions
110 lines (90 loc) · 2.95 KB
/
familiar_mode_vimrc.vim
File metadata and controls
110 lines (90 loc) · 2.95 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
"""" INTRODUCTION """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"
" Author:
" Dr-Lord
" Version:
" 1.3 - 01/02/2014
"
" Repository:
" https://github.com/Dr-Lord/Vim
"
" Description:
" This configuration file contains additional or alternative more familiar
" mappings to the ones set in other files.
" It overwrites corresponding previous maps and makes vim behave like a
" typical modern text editor for common maps (most of the time, then the
" Vimness kicks in).
"
"""" SETTINGS """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Make all yank, delete, change and put operations use the system clipboard
" register (* and/or +), making it more convenient to pass data to and from Vim
set clipboard=unnamed,unnamedplus
"""" MAPPINGS """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" ALL: Ctrl-Tab,-Shift-Tab : next and previous tab
noremap <C-Tab> :tabnext<Enter>
noremap <C-S-Tab> :tabprevious<Enter>
" ALL: Ctrl-t,w : New tab and close tab
noremap <C-t> :tabnew<Enter>
noremap <C-w> :tabclose<Enter>
" ALL: Ctrl-x,c,v : cut, copy and paste
noremap <C-x> "*d
noremap <C-c> "*y
noremap <C-v> "*gp
inoremap <C-v> <Esc>"*gpi
" For Ctrl-v to work on Unix, autoselect must be off.
if !has("unix")
set guioptions-=a
endif
" NORMAL, VISUAL AND INSERT: Crtl-z,y : undo and redo
nnoremap <C-z> u
nnoremap <C-y> <C-r>
vnoremap <C-z> <Esc>u
vnoremap <C-y> <Esc><C-r>
inoremap <C-z> <Esc>ui
inoremap <C-y> <Esc><C-r>i
" NORMAL AND INSERT: Crtl-a : select all
noremap <C-A> gggH<C-O>G
inoremap <C-A> <C-O>gg<C-O>gH<C-O>G
cnoremap <C-A> <C-C>gggH<C-O>G
onoremap <C-A> <C-C>gggH<C-O>G
snoremap <C-A> <C-C>gggH<C-O>G
xnoremap <C-A> <C-C>ggVG
" NORMAL, VISUAL AND INSERT: Ctrl-s : save
nnoremap <C-s> :w<Enter>
vnoremap <C-s> <Esc>:w<Enter>
inoremap <C-s> <Esc>:w<Enter>
" NORMAL, VISUAL AND INSERT: Crtl-f : find
nnoremap <C-f> /
inoremap <C-f> <Esc>/
vnoremap <C-f> <Esc>/
" NORMAL, VISUAL: Make arrows behave as arrows (reverting previous maps)
noremap <Left> <Left>
noremap <Right> <Right>
noremap <Up> <Up>
noremap <Down> <Down>
" NORMAL, VISUAL AND INSERT: Shift-Arrows : visual selection
nnoremap <S-Right> v<Right>
nnoremap <S-Left> v<Left>
nnoremap <S-Up> v<Up>
nnoremap <S-Down> v<Down>
vnoremap <S-Right> <Right>
vnoremap <S-Left> <Left>
vnoremap <S-Up> <Up>
vnoremap <S-Down> <Down>
inoremap <S-Up> <Esc>v<Up>
inoremap <S-Down> <Esc>v<Down>
inoremap <S-Left> <Esc>v<Left>
inoremap <S-Right> <Esc>v<Right>
" NORMAL, VISUAL AND INSERT: Alt-Shift-Arrows : blockwise-visual selection
noremap <A-S-Right> <C-v><Right>
noremap <A-S-Left> <C-v><Left>
noremap <A-S-Up> <C-v><Up>
noremap <A-S-Down> <C-v><Down>
vnoremap <A-S-Right> <Right>
vnoremap <A-S-Left> <Left>
vnoremap <A-S-Up> <Up>
vnoremap <A-S-Down> <Down>
inoremap <A-S-Up> <Esc><C-v><Right>
inoremap <A-S-Down> <Esc><C-v><Left>
inoremap <A-S-Left> <Esc><C-v><Up>
inoremap <A-S-Right> <Esc><C-v><Down>