-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_vsvimrc
90 lines (64 loc) · 1.96 KB
/
_vsvimrc
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
set smartcase
set ignorecase
set gdefault
set incsearch
"set showmatch
set hlsearch
let mapleader=" "
noremap <ESC><ESC> :noh<cr>
vnoremap <ESC><ESC> <ESC>
vnoremap / /\v
nnoremap / /\v
vnoremap j gj
nnoremap j gj
vnoremap k gk
nnoremap k gk
vnoremap H b
nnoremap H b
vnoremap L w
nnoremap L w
vnoremap q ``zz
nnoremap q ``zz
vnoremap u uzz
nnoremap u uzz
noremap Y y$
noremap p pA
map N Nzz
map n nzz
" yank word under cursor
noremap <leader>y yiw
vnoremap <leader>y y
" replace word under cursor with yanked word
noremap <leader>p ciw<C-r>0
vnoremap <leader>p c<c-r>0
" reload config file
:nnoremap <leader>R :source C:\Users\thomas.galdi.wsil\_vsvimrc
" find and replace all occurances in file of word under cursor
:nnoremap <leader>s :%s/\<<C-r><C-w>\>/
" find/highlight all occurances of word under cursor and replace just word under cursor
" remains at current location and allows browsing of occurances
:nnoremap <leader>r :s/\<<C-r><C-w>\>/
" replace characters that are visually selected
:vnoremap <leader>k "hy:%s/<C-r>h/
" does not work when copying characters and white space?
" :vnoremap <leader>l "hy:%s/\<<C-r>h\>/
" find/highlight all occurances of word under cursor but remain at location
:nnoremap * :let @/="\\<<c-r><c-w>\\>"<CR>:set hls<CR>
" change within boundary under cursor
:nnoremap <leader>t vy:execute "normal! ci<c-r><c-w> "<CR>i
" insert a spaces inside boundary before and after data it contains
:nnoremap <leader>T vy:execute "normal! di<c-r><c-w> " <CR>i <ESC>p i <ESC>
" CTRL-V Paste
"map <C-V> "+gP
"imap <C-V> <Esc>"+gpa
"cmap <C-V> <C-R>+
" Use CTRL-Q to do what CTRL-V does in vim ( block selection )
"noremap <C-Q> <C-V>
"function! FindAndReplace()
" call inputsave()
" let find = input('Find Query:')
" call inputrestore()
" let replace = input('Replace Query:')
" call inputrestore()
" execute '%s/'.find/'.replace.'/gc'
"endfunction