File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -168,12 +168,25 @@ function! FormatXML()
168
168
echom " Formatting XML file"
169
169
execute " :silent %!xmllint --format --recover - 2>/dev/null"
170
170
endfunction
171
- " " End function definitions
171
+
172
+ function ! CopyContentToClipboard ()
173
+ if executable (" clip.exe" )
174
+ execute " :silent '<,'>w !clip.exe"
175
+ elseif executable (" xclip" )
176
+ execute " :silent '<,'>w !xclip"
177
+ elseif executable (" pbcopy" )
178
+ execute " :silent '<,'>w !pbcopy"
179
+ endif
180
+ endfunction
181
+ " " End of function definitions
172
182
173
183
" " Mark the limit of <text-width>
174
184
nnoremap <leader> j :call TogglePageLimit()<CR>
175
185
nnoremap ;t :call SearchDevTags()<CR>
176
186
187
+ " " Copy selected content (visual model) to clipboard
188
+ vnoremap <C-C> :call CopyContentToClipboard()<CR>
189
+
177
190
set statusline = % ! SetCustomStatusLine (' ' )
178
191
map <F2> :call ToggleLangCheck()<CR>
179
192
set pastetoggle = <F4>
Original file line number Diff line number Diff line change @@ -130,6 +130,8 @@ default.
130
130
* ``<C-j> ``: for moving between splits (instead of ``<C-W><C-j> ``).
131
131
Same for ``h ``, ``k ``, or ``l `` respectively.
132
132
133
+ * `Ctrl ` + `C `: Copy selected content to clipboard.
134
+
133
135
* Other features
134
136
135
137
* ``scrolloff=10 ``: offset of 10 lines when scrolling
You can’t perform that action at this time.
0 commit comments