mirror of
https://github.com/amix/vimrc
synced 2025-07-10 03:25:00 +08:00
rename vim_plugins_src to vim_plugin_candinates_src and used as an plugin candinate dir
This commit is contained in:
6
vim_plugin_candinates_src/vim-fakeclip-0.2.10/.mduem/cache/Makefile.variables
vendored
Normal file
6
vim_plugin_candinates_src/vim-fakeclip-0.2.10/.mduem/cache/Makefile.variables
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
all_files_in_repos := Makefile autoload/fakeclip.vim doc/fakeclip.txt plugin/fakeclip.vim test/clipboard-cygwin.expected test/clipboard-cygwin.input test/clipboard-mac.expected test/clipboard-mac.input test/clipboard-x.expected test/clipboard-x.input test/misc.expected test/misc.input test/pastebuffer-gnuscreen.expected test/pastebuffer-gnuscreen.input test/pastebuffer-tmux.expected test/pastebuffer-tmux.input test/ui.expected test/ui.input
|
||||
current_branch := master
|
||||
origin_name := origin
|
||||
origin_uri := ../.
|
||||
repos_name := vim-fakeclip
|
||||
version := 0.2.10
|
13
vim_plugin_candinates_src/vim-fakeclip-0.2.10/Makefile
Normal file
13
vim_plugin_candinates_src/vim-fakeclip-0.2.10/Makefile
Normal file
@ -0,0 +1,13 @@
|
||||
# Makefile for vim-fakeclip
|
||||
|
||||
REPOS_TYPE := vim-script
|
||||
INSTALLATION_DIR := $(HOME)/.vim
|
||||
TARGETS_STATIC = $(filter %.vim %.txt,$(all_files_in_repos))
|
||||
TARGETS_ARCHIVED = $(all_files_in_repos) mduem/Makefile
|
||||
|
||||
|
||||
|
||||
|
||||
include mduem/Makefile
|
||||
|
||||
# __END__
|
@ -0,0 +1,360 @@
|
||||
" fakeclip - pseude clipboard register for non-GUI version of Vim
|
||||
" Version: 0.2.10
|
||||
" Copyright (C) 2008-2012 Kana Natsuno <http://whileimautomaton.net/>
|
||||
" License: So-called MIT/X license {{{
|
||||
" Permission is hereby granted, free of charge, to any person obtaining
|
||||
" a copy of this software and associated documentation files (the
|
||||
" "Software"), to deal in the Software without restriction, including
|
||||
" without limitation the rights to use, copy, modify, merge, publish,
|
||||
" distribute, sublicense, and/or sell copies of the Software, and to
|
||||
" permit persons to whom the Software is furnished to do so, subject to
|
||||
" the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included
|
||||
" in all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
" }}}
|
||||
" Platform detection "{{{1
|
||||
|
||||
if has('macunix') || system('uname') =~? '^darwin'
|
||||
let s:PLATFORM = 'mac'
|
||||
elseif has('win32unix')
|
||||
let s:PLATFORM = 'cygwin'
|
||||
elseif $DISPLAY != '' && executable('xclip')
|
||||
let s:PLATFORM = 'x'
|
||||
else
|
||||
let s:PLATFORM = 'unknown'
|
||||
endif
|
||||
|
||||
|
||||
if executable('tmux') && $TMUX != ''
|
||||
let g:fakeclip_terminal_multiplexer_type = 'tmux'
|
||||
elseif executable('screen') && $STY != ''
|
||||
let g:fakeclip_terminal_multiplexer_type = 'gnuscreen'
|
||||
elseif executable('tmux') && executable('screen')
|
||||
if exists('g:fakeclip_terminal_multiplexer_type')
|
||||
" Use user-defined value as is.
|
||||
else
|
||||
let g:fakeclip_terminal_multiplexer_type = 'tmux'
|
||||
endif
|
||||
elseif executable('tmux') && !executable('screen')
|
||||
let g:fakeclip_terminal_multiplexer_type = 'tmux'
|
||||
elseif !executable('tmux') && executable('screen')
|
||||
let g:fakeclip_terminal_multiplexer_type = 'gnuscreen'
|
||||
else
|
||||
let g:fakeclip_terminal_multiplexer_type = 'unknown'
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
" Interface "{{{1
|
||||
function! fakeclip#clipboard_delete(motion_type) "{{{2
|
||||
return fakeclip#delete('clipboard', a:motion_type)
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! fakeclip#clipboard_yank(motion_type) "{{{2
|
||||
return fakeclip#yank('clipboard', a:motion_type)
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! fakeclip#content(system_type) "{{{2
|
||||
return s:read_{a:system_type}()
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! fakeclip#delete(system_type, motion_type) "{{{2
|
||||
call s:select_last_motion(a:motion_type)
|
||||
execute 'normal!' (a:motion_type == 'V' ? 'D' : 'd')
|
||||
call s:write_{a:system_type}(@@)
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! fakeclip#pastebuffer_delete(motion_type) "{{{2
|
||||
return fakeclip#delete('pastebuffer', a:motion_type)
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! fakeclip#pastebuffer_yank(motion_type) "{{{2
|
||||
return fakeclip#yank('pastebuffer', a:motion_type)
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! fakeclip#put(system_type, motion_type, put_type) "{{{2
|
||||
let r_ = s:save_register('"')
|
||||
let @@ = fakeclip#content(a:system_type)
|
||||
|
||||
if a:motion_type == ''
|
||||
execute 'normal!' s:count().a:put_type
|
||||
call s:restore_register('"', r_)
|
||||
else
|
||||
call s:select_last_motion(a:motion_type)
|
||||
execute 'normal!' s:count().a:put_type
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! fakeclip#yank(system_type, motion_type) "{{{2
|
||||
let r0 = s:save_register('0')
|
||||
|
||||
call s:select_last_motion(a:motion_type)
|
||||
normal! y
|
||||
call s:write_{a:system_type}(@@)
|
||||
|
||||
call s:restore_register('0', r0)
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! fakeclip#yank_Y(system_type) "{{{2
|
||||
let diff = s:count() - 1
|
||||
normal! V
|
||||
if 0 < diff
|
||||
execute 'normal!' diff.'j'
|
||||
endif
|
||||
execute 'normal' (a:system_type ==# 'clipboard'
|
||||
\ ? "\<Plug>(fakeclip-Y)"
|
||||
\ : "\<Plug>(fakeclip-screen-Y)")
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
" Core "{{{1
|
||||
function! s:read_clipboard() "{{{2
|
||||
return s:read_clipboard_{s:PLATFORM}()
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:read_clipboard_mac()
|
||||
return system('pbpaste')
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:read_clipboard_cygwin()
|
||||
let content = ''
|
||||
for line in readfile('/dev/clipboard', 'b')
|
||||
let content = content . "\x0A" . substitute(line, "\x0D", '', 'g')
|
||||
endfor
|
||||
return content[1:]
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:read_clipboard_x()
|
||||
return system('xclip -o')
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:read_clipboard_unknown()
|
||||
echoerr 'Getting the clipboard content is not supported on this platform:'
|
||||
\ s:PLATFORM
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! s:read_pastebuffer() "{{{2
|
||||
return s:read_pastebuffer_{g:fakeclip_terminal_multiplexer_type}()
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:read_pastebuffer_gnuscreen()
|
||||
let _ = tempname()
|
||||
call system('screen -X writebuf ' . shellescape(_))
|
||||
" FIXME: Here we have to wait "writebuf" for writing, because the
|
||||
" following readfile() may read the temporary file which is not
|
||||
" flushed yet -- but, how to wait?
|
||||
" call system(printf('while ! test -f %s; do true; done',
|
||||
" \ shellescape(_)))
|
||||
"
|
||||
" NB: "writebuf" creates an empty file if the paste buffer is emptied by
|
||||
" "readbuf /dev/null", but it doesn't create any file is the paste
|
||||
" buffer is emptied by "register . ''". So here we have to check the
|
||||
" existence of the temporary file.
|
||||
if exists('g:fakeclip_delay_to_read_pastebuffer_gnuscreen')
|
||||
execute 'sleep' g:fakeclip_delay_to_read_pastebuffer_gnuscreen
|
||||
endif
|
||||
let content = filereadable(_) ? join(readfile(_, 'b'), "\n") : ''
|
||||
call delete(_)
|
||||
return content
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:read_pastebuffer_tmux()
|
||||
return system('tmux show-buffer')
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:read_pastebuffer_unknown()
|
||||
echoerr 'Paste buffer is not available'
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! s:write_clipboard(text) "{{{2
|
||||
call s:write_clipboard_{s:PLATFORM}(a:text)
|
||||
return
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:write_clipboard_mac(text)
|
||||
call system('pbcopy', a:text)
|
||||
return
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:write_clipboard_cygwin(text)
|
||||
call writefile(split(a:text, "\x0A", 1), '/dev/clipboard', 'b')
|
||||
return
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:write_clipboard_x(text)
|
||||
call system('xclip', a:text)
|
||||
return
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:write_clipboard_unknown(text)
|
||||
echoerr 'Yanking into the clipboard is not supported on this platform:'
|
||||
\ s:PLATFORM
|
||||
return
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! s:write_pastebuffer(text) "{{{2
|
||||
let lines = split(a:text, '\n', !0)
|
||||
return s:write_pastebuffer_{g:fakeclip_terminal_multiplexer_type}(lines)
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:write_pastebuffer_gnuscreen(lines)
|
||||
let _ = tempname()
|
||||
call writefile(a:lines, _, 'b')
|
||||
call system('screen -X readbuf ' . shellescape(_))
|
||||
call delete(_)
|
||||
return
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:write_pastebuffer_tmux(lines)
|
||||
let _ = tempname()
|
||||
call writefile(a:lines, _, 'b')
|
||||
call system('tmux load-buffer ' . shellescape(_))
|
||||
call delete(_)
|
||||
return
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:write_pastebuffer_unknown(lines)
|
||||
echoerr 'Paste buffer is not available'
|
||||
return
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
" Misc. "{{{1
|
||||
function! fakeclip#_local_variables() "{{{2
|
||||
return s:
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! fakeclip#_sid_prefix() "{{{2
|
||||
nnoremap <SID> <SID>
|
||||
return maparg('<SID>', 'n')
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! s:count() "{{{2
|
||||
return (v:count == v:count1) ? v:count : ''
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! s:restore_register(regname, reginfo) "{{{2
|
||||
call setreg(a:regname, a:reginfo[0], a:reginfo[1])
|
||||
return
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! s:save_register(regname) "{{{2
|
||||
return [getreg(a:regname), getregtype(a:regname)]
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function! s:select_last_motion(motion_type) "{{{2
|
||||
let orig_selection = &selection
|
||||
let &selection = 'inclusive'
|
||||
|
||||
if a:motion_type == 'char'
|
||||
normal! `[v`]
|
||||
elseif a:motion_type == 'line'
|
||||
normal! '[V']
|
||||
elseif a:motion_type == 'block'
|
||||
execute "normal! `[\<C-v>`]"
|
||||
else " invoked from visual mode
|
||||
normal! gv
|
||||
endif
|
||||
|
||||
let &selection = orig_selection
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
" __END__ "{{{1
|
||||
" vim: foldmethod=marker
|
384
vim_plugin_candinates_src/vim-fakeclip-0.2.10/doc/fakeclip.txt
Normal file
384
vim_plugin_candinates_src/vim-fakeclip-0.2.10/doc/fakeclip.txt
Normal file
@ -0,0 +1,384 @@
|
||||
*fakeclip.txt* pseudo clipboard register for non-GUI version of Vim
|
||||
|
||||
Version 0.2.10
|
||||
Script ID: 2098
|
||||
Copyright (C) 2007-2012 Kana Natsuno <http://whileimautomaton.net/>
|
||||
License: So-called MIT/X license {{{
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
}}}
|
||||
|
||||
CONTENTS *fakeclip-contents*
|
||||
|
||||
Introduction |fakeclip-introduction|
|
||||
Interface |fakeclip-interface|
|
||||
Key Mappings |fakeclip-key-mappings|
|
||||
Variables |fakeclip-variables|
|
||||
Bugs |fakeclip-bugs|
|
||||
Changelog |fakeclip-changelog|
|
||||
|
||||
|
||||
|
||||
|
||||
==============================================================================
|
||||
INTRODUCTION *fakeclip-introduction*
|
||||
|
||||
*fakeclip* is a Vim plugin to provide a pseudo |clipboard| register for
|
||||
several versions of Vim without |+clipboard| support, especially for non-GUI
|
||||
version of Vim on the following platforms:
|
||||
|
||||
- Cygwin
|
||||
- Mac OS X
|
||||
- X Window System (by xclip <http://sourceforge.net/projects/xclip/>)
|
||||
|
||||
|
||||
fakeclip also provides a pseudo register to access a "paste buffer" if one of
|
||||
the following applications is available:
|
||||
|
||||
- GNU screen
|
||||
- tmux
|
||||
|
||||
|
||||
FAQ: If you can't copy/paste multibyte characters with the clipboard
|
||||
on Mac OS X, see |fakeclip-multibyte-on-mac|.
|
||||
|
||||
Note for Mac OS users: Though Vim supports clipboard for the console version
|
||||
since version 7.3, fakeclip is still useful to access a "paste buffer".
|
||||
|
||||
|
||||
Requirements:
|
||||
- Vim 7.0 or later
|
||||
|
||||
Latest version:
|
||||
http://github.com/kana/vim-fakeclip
|
||||
|
||||
Document in HTML format:
|
||||
http://kana.github.com/config/vim/fakeclip.html
|
||||
|
||||
|
||||
|
||||
|
||||
==============================================================================
|
||||
INTERFACE *fakeclip-interface*
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
KEY MAPPINGS *fakeclip-key-mappings*
|
||||
|
||||
[count]<Plug>(fakeclip-y){motion} *<Plug>(fakeclip-y)*
|
||||
[count]<Plug>(fakeclip-Y) *<Plug>(fakeclip-Y)*
|
||||
{Visual}<Plug>(fakeclip-y) *v_<Plug>(fakeclip-y)*
|
||||
{Visual}<Plug>(fakeclip-Y) *v_<Plug>(fakeclip-Y)*
|
||||
Like |y| or |Y|, but yank into the clipboard.
|
||||
|
||||
[count]<Plug>(fakeclip-d){motion} *<Plug>(fakeclip-d)*
|
||||
[count]<Plug>(fakeclip-dd) *<Plug>(fakeclip-dd)*
|
||||
[count]<Plug>(fakeclip-D) *<Plug>(fakeclip-D)*
|
||||
{Visual}<Plug>(fakeclip-d) *v_<Plug>(fakeclip-d)*
|
||||
{Visual}<Plug>(fakeclip-D) *v_<Plug>(fakeclip-D)*
|
||||
Like |d|, |dd| or |D|, but cut into the clipboard.
|
||||
|
||||
[count]<Plug>(fakeclip-p) *<Plug>(fakeclip-p)*
|
||||
[count]<Plug>(fakeclip-P) *<Plug>(fakeclip-P)*
|
||||
[count]<Plug>(fakeclip-gp) *<Plug>(fakeclip-gp)*
|
||||
[count]<Plug>(fakeclip-gP) *<Plug>(fakeclip-gP)*
|
||||
[count]<Plug>(fakeclip-]p) *<Plug>(fakeclip-]p)*
|
||||
[count]<Plug>(fakeclip-]P) *<Plug>(fakeclip-]P)*
|
||||
[count]<Plug>(fakeclip-[p) *<Plug>(fakeclip-[p)*
|
||||
[count]<Plug>(fakeclip-[P) *<Plug>(fakeclip-[P)*
|
||||
Like |p|, |P|, |gp|, |gP|, |]p|, |]P|, |[p| or
|
||||
|[P|, but put from the clipboard.
|
||||
*c_<Plug>(fakeclip-insert)*
|
||||
<Plug>(fakeclip-insert) *i_<Plug>(fakeclip-insert)*
|
||||
*c_<Plug>(fakeclip-insert-r)*
|
||||
<Plug>(fakeclip-insert-r) *i_<Plug>(fakeclip-insert-r)*
|
||||
*c_<Plug>(fakeclip-insert-o)*
|
||||
<Plug>(fakeclip-insert-o) *i_<Plug>(fakeclip-insert-o)*
|
||||
<Plug>(fakeclip-insert-p) *i_<Plug>(fakeclip-insert-p)*
|
||||
Like |i_CTRL-R|, |i_CTRL-R_CTRL-R|, |i_CTRL-R_CTRL-O|,
|
||||
|i_CTRL-R_CTRL-P|, |c_CTRL-R|, |c_CTRL-R_CTRL-R| or
|
||||
|c_CTRL-R_CTRL-O|, but insert the content of the
|
||||
clipboard.
|
||||
|
||||
|
||||
[count]<Plug>(fakeclip-screen-y){motion} *<Plug>(fakeclip-screen-y)*
|
||||
[count]<Plug>(fakeclip-screen-Y) *<Plug>(fakeclip-screen-Y)*
|
||||
{Visual}<Plug>(fakeclip-screen-y) *v_<Plug>(fakeclip-screen-y)*
|
||||
{Visual}<Plug>(fakeclip-screen-Y) *v_<Plug>(fakeclip-screen-Y)*
|
||||
Like |y| or |Y|, but yank into the paste buffer.
|
||||
|
||||
[count]<Plug>(fakeclip-screen-d){motion} *<Plug>(fakeclip-screen-d)*
|
||||
[count]<Plug>(fakeclip-screen-dd) *<Plug>(fakeclip-screen-dd)*
|
||||
[count]<Plug>(fakeclip-screen-D) *<Plug>(fakeclip-screen-D)*
|
||||
{Visual}<Plug>(fakeclip-screen-d) *v_<Plug>(fakeclip-screen-d)*
|
||||
{Visual}<Plug>(fakeclip-screen-D) *v_<Plug>(fakeclip-screen-D)*
|
||||
Like |d|, |dd| or |D|, but cut into the pastebuffer.
|
||||
|
||||
[count]<Plug>(fakeclip-screen-p) *<Plug>(fakeclip-screen-p)*
|
||||
[count]<Plug>(fakeclip-screen-P) *<Plug>(fakeclip-screen-P)*
|
||||
[count]<Plug>(fakeclip-screen-gp) *<Plug>(fakeclip-screen-gp)*
|
||||
[count]<Plug>(fakeclip-screen-gP) *<Plug>(fakeclip-screen-gP)*
|
||||
[count]<Plug>(fakeclip-screen-]p) *<Plug>(fakeclip-screen-]p)*
|
||||
[count]<Plug>(fakeclip-screen-]P) *<Plug>(fakeclip-screen-]P)*
|
||||
[count]<Plug>(fakeclip-screen-[p) *<Plug>(fakeclip-screen-[p)*
|
||||
[count]<Plug>(fakeclip-screen-[P) *<Plug>(fakeclip-screen-[P)*
|
||||
Like |p|, |P|, |gp|, |gP|, |]p|, |]P|, |[p| or |[P|,
|
||||
but put from the paste buffer.
|
||||
*c_<Plug>(fakeclip-screen-insert)*
|
||||
<Plug>(fakeclip-screen-insert) *i_<Plug>(fakeclip-screen-insert)*
|
||||
*c_<Plug>(fakeclip-screen-insert-r)*
|
||||
<Plug>(fakeclip-screen-insert-r) *i_<Plug>(fakeclip-screen-insert-r)*
|
||||
*c_<Plug>(fakeclip-screen-insert-o)*
|
||||
<Plug>(fakeclip-screen-insert-o) *i_<Plug>(fakeclip-screen-insert-o)*
|
||||
<Plug>(fakeclip-screen-insert-p) *i_<Plug>(fakeclip-screen-insert-p)*
|
||||
Like |i_CTRL-R|, |i_CTRL-R_CTRL-R|, |i_CTRL-R_CTRL-O|,
|
||||
|i_CTRL-R_CTRL-P|, |c_CTRL-R|, |c_CTRL-R_CTRL-R| or
|
||||
|c_CTRL-R_CTRL-O|, but insert the content of the
|
||||
paste buffer.
|
||||
|
||||
|
||||
*g:fakeclip_no_default_key_mappings*
|
||||
*:FakeclipDefaultKeyMappings*
|
||||
Fakeclip will define the following key mappings. If you don't want to define
|
||||
these default key mappings, define |g:fakeclip_no_default_key_mappings| before
|
||||
this plugin is loaded (e.g. in your |vimrc|). You can also use
|
||||
|:FakeclipDefaultKeyMappings| to redefine these key mappings. This command
|
||||
doesn't override existing {lhs}s unless [!] is given.
|
||||
|
||||
modes {lhs} {rhs} ~
|
||||
----- ----------- -------------------------------- ~
|
||||
nv "+y <Plug>(fakeclip-y)
|
||||
nv "*y <Plug>(fakeclip-y)
|
||||
n "+yy <Plug>(fakeclip-Y)
|
||||
n "*yy <Plug>(fakeclip-Y)
|
||||
nv "+Y <Plug>(fakeclip-Y)
|
||||
nv "*Y <Plug>(fakeclip-Y)
|
||||
nv "+d <Plug>(fakeclip-d)
|
||||
nv "*d <Plug>(fakeclip-d)
|
||||
n "+dd <Plug>(fakeclip-dd)
|
||||
n "*dd <Plug>(fakeclip-dd)
|
||||
nv "+D <Plug>(fakeclip-D)
|
||||
nv "*D <Plug>(fakeclip-D)
|
||||
nv "+p <Plug>(fakeclip-p)
|
||||
nv "*p <Plug>(fakeclip-p)
|
||||
nv "+P <Plug>(fakeclip-P)
|
||||
nv "*P <Plug>(fakeclip-P)
|
||||
nv "+gp <Plug>(fakeclip-gp)
|
||||
nv "*gp <Plug>(fakeclip-gp)
|
||||
nv "+gP <Plug>(fakeclip-gP)
|
||||
nv "*gP <Plug>(fakeclip-gP)
|
||||
nv "+]p <Plug>(fakeclip-]p)
|
||||
nv "*]p <Plug>(fakeclip-]p)
|
||||
nv "+]P <Plug>(fakeclip-]P)
|
||||
nv "*]P <Plug>(fakeclip-]P)
|
||||
nv "+[p <Plug>(fakeclip-[p)
|
||||
nv "*[p <Plug>(fakeclip-[p)
|
||||
nv "+[P <Plug>(fakeclip-[P)
|
||||
nv "*[P <Plug>(fakeclip-[P)
|
||||
ic <C-r>+ <Plug>(fakeclip-insert)
|
||||
ic <C-r>* <Plug>(fakeclip-insert)
|
||||
ic <C-r><C-r>+ <Plug>(fakeclip-insert-r)
|
||||
ic <C-r><C-r>* <Plug>(fakeclip-insert-r)
|
||||
ic <C-r><C-o>+ <Plug>(fakeclip-insert-o)
|
||||
ic <C-r><C-o>* <Plug>(fakeclip-insert-o)
|
||||
i <C-r><C-p>+ <Plug>(fakeclip-insert-p)
|
||||
i <C-r><C-p>* <Plug>(fakeclip-insert-p)
|
||||
nv "&y <Plug>(fakeclip-screen-y)
|
||||
n "&yy <Plug>(fakeclip-screen-Y)
|
||||
nv "&Y <Plug>(fakeclip-screen-Y)
|
||||
nv "&d <Plug>(fakeclip-screen-d)
|
||||
n "&dd <Plug>(fakeclip-screen-dd)
|
||||
nv "&D <Plug>(fakeclip-screen-D)
|
||||
nv "&p <Plug>(fakeclip-screen-p)
|
||||
nv "&P <Plug>(fakeclip-screen-P)
|
||||
nv "&gp <Plug>(fakeclip-screen-gp)
|
||||
nv "&gP <Plug>(fakeclip-screen-gP)
|
||||
nv "&]p <Plug>(fakeclip-screen-]p)
|
||||
nv "&]P <Plug>(fakeclip-screen-]P)
|
||||
nv "&[p <Plug>(fakeclip-screen-[p)
|
||||
nv "&[P <Plug>(fakeclip-screen-[P)
|
||||
ic <C-r>& <Plug>(fakeclip-screen-insert)
|
||||
ic <C-r><C-r>& <Plug>(fakeclip-screen-insert-r)
|
||||
ic <C-r><C-o>& <Plug>(fakeclip-screen-insert-o)
|
||||
i <C-r><C-p>& <Plug>(fakeclip-screen-insert-p)
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
VARIABLES *fakeclip-variables*
|
||||
|
||||
g:fakeclip_no_default_key_mappings
|
||||
See |g:fakeclip_no_default_key_mappings|.
|
||||
|
||||
g:fakeclip_terminal_multiplexer_type *g:fakeclip_terminal_multiplexer_type*
|
||||
A string to specify your favorite terminal multiplexer. One of the
|
||||
following values can be specified:
|
||||
|
||||
"gnuscreen"
|
||||
Use GNU screen.
|
||||
"tmux"
|
||||
Use tmux.
|
||||
"unknown"
|
||||
Use no terminal multiplexer.
|
||||
|
||||
The default value is determined as follows:
|
||||
|
||||
1. "tmux" will be used if Vim is running in a tmux session.
|
||||
2. "gnuscreen" will be used if Vim is running in a GNU screen session.
|
||||
3. User-defined value (via |vimrc| etc) will be used if both tmux and
|
||||
GNU screen are installed. "tmux" will be used if user does not
|
||||
define the value.
|
||||
4. "tmux" will be used if only tmux is installed.
|
||||
5. "gnuscreen" will be used if only GNU screen is installed.
|
||||
6. "unknown" will be used otherwise.
|
||||
|
||||
|
||||
|
||||
|
||||
==============================================================================
|
||||
BUGS *fakeclip-bugs*
|
||||
|
||||
(a) This plugin just provide pseudo clipboard register for ordinary editing.
|
||||
So |getreg()|, |setreg()|, |expr-register| and other interface on clipboard
|
||||
register are not supported.
|
||||
|
||||
(b) The characteristic (i.e., characterwise, linewise or blockwise) of the
|
||||
clipboard content is not remembered. It will be linewise if each line of the
|
||||
clipboard content ends with a newline, otherwise it will be characterwise.
|
||||
|
||||
(c) Executing <Plug>(fakeclip-y) in Normal mode, the display of 'showcmd' is
|
||||
different from the ordinary one.
|
||||
|
||||
(d) <Plug>(fakeclip-y) in Normal mode doesn't accept "y" as a linewise
|
||||
{motion} like the built-in |y|.
|
||||
*fakeclip-multibyte-on-mac*
|
||||
(e) On Mac OS X, you have to set a proper value to the environment variable
|
||||
__CF_USER_TEXT_ENCODING. It contins :-separated values:
|
||||
|
||||
- The 1st value means a user id. It must be the same as the result of the
|
||||
following command:
|
||||
>
|
||||
printf '0x%X\n' `id -u`
|
||||
<
|
||||
- The 2nd value means the character encoding which is used to translate
|
||||
string data between GUI and Terminal. For example, if you work on
|
||||
Terminal with UTF-8, the 2nd value of __CF_USER_TEXT_ENCODING must be
|
||||
set to "0x08000100". See the following URI for the magic values to
|
||||
specify character encodings:
|
||||
|
||||
http://developer.apple.com/documentation/CoreFoundation/Reference/CFStringRef/
|
||||
|
||||
For example, the valaue of __CF_USER_TEXT_ENCODING on the author's
|
||||
environment is as follows:
|
||||
>
|
||||
0x1F5:0x08000100:0
|
||||
<
|
||||
(f) On Mac OS X, if you use Vim on GNU screen and you can't copy/paste text
|
||||
with the clipboard, try installing GNU screen from MacPorts with "+darwin"
|
||||
variants.
|
||||
|
||||
(g) There is a race condition problem to read the paste buffer of GNU screen.
|
||||
|
||||
|
||||
|
||||
|
||||
==============================================================================
|
||||
CHANGELOG *fakeclip-changelog*
|
||||
|
||||
0.2.10 2012-01-22T01:50:21+09:00 *fakeclip-changelog-0.2.10*
|
||||
- Improve the detection of terminal multiplexers. In other words,
|
||||
(a) use a more suitable one according to the current environment;
|
||||
(b) support using the pastebuffer from Vim not in a tmux session.
|
||||
See also |g:fakeclip_terminal_multiplexer_type| for the details.
|
||||
(Thanks m4i for reporting the problem via
|
||||
https://github.com/kana/vim-fakeclip/pull/5)
|
||||
|
||||
0.2.9 2011-10-07T20:50:58+09:00 *fakeclip-changelog-0.2.9*
|
||||
- Add support for |d|, |dd| and |D| operation for the clipboard and
|
||||
the pastebuffer. (Thanks for Suan-Aik Yeo)
|
||||
|
||||
0.2.8 2010-08-31T20:19:51+09:00 *fakeclip-changelog-0.2.8*
|
||||
- |:FakeclipDefaultKeyMappings|: Fix to regard a given bang.
|
||||
|
||||
0.2.7 2010-04-02T21:27:16+09:00 *fakeclip-changelog-0.2.7*
|
||||
- Fix to read/write the paste buffer of GNU screen outside a session.
|
||||
Old versions allow to read/write the paste buffer only if Vim is
|
||||
running in a session of GNU screen.
|
||||
|
||||
0.2.6 2009-11-16T20:49:35+09:00 *fakeclip-changelog-0.2.6*
|
||||
- Fix improper error message on putting to paste buffer. (Thanks
|
||||
to @thinca for reporting)
|
||||
- Fix a bug that there is a possibility to fail to read the paste
|
||||
buffer of GNU screen if it is emptied by "register . ''". (Thanks
|
||||
to @thinca for reporting)
|
||||
- Revise for race condition problem to read the paste buffer of GNU
|
||||
screen, though it's not perfect yet.
|
||||
|
||||
0.2.5 2009-11-11T21:51:50+09:00 *fakeclip-changelog-0.2.5*
|
||||
- Revise the way to detect whether GNU screen is available or not.
|
||||
- Fix a bug to yank to string with newline character into paste buffer
|
||||
register.
|
||||
- Support X Window System by xclip. (Thanks for @thinca)
|
||||
- Support tmux. (Thanks for @thinca)
|
||||
|
||||
0.2.4 2009-06-13T18:22:01+09:00 *fakeclip-changelog-0.2.4*
|
||||
- Revise on platforms where |+clipboard| is available:
|
||||
- Define all stuffs such as |fakeclip-key-mappings| on all
|
||||
platforms. Without this, the pseudo register for GNU screen's
|
||||
paste buffer is not available if |+clipboard| is available.
|
||||
- |:FakeclipDefaultKeyMappings|: Don't define the default key
|
||||
mappings for clipboard to avoid confusion with the built-in key
|
||||
mappings. For example, "*y and "+y are not mapped to
|
||||
|<Plug>(fakeclip-y)|.
|
||||
|
||||
0.2.3 2009-05-06T03:03:25+09:00 *fakeclip-changelog-0.2.3*
|
||||
- Revise the documents on Mac OS X specific problems. See
|
||||
|fakeclip-multibyte-on-mac| if you can't copy/paste with the
|
||||
clipboard on Mac OS X.
|
||||
- Fix a bug that fakeclip uses wrong function to escape file-like
|
||||
arguments to shells. Thanks @thinca for reporting this.
|
||||
|
||||
0.2.2 2009-03-25T21:17:25+09:00 *fakeclip-changelog-0.2.2*
|
||||
- Add equivalents for the following commands:
|
||||
|]p|, |]P|, |[p|, |[P|, |i_CTRL-R_CTRL-R|, |i_CTRL-R_CTRL-O|,
|
||||
|i_CTRL-R_CTRL-P|, |c_CTRL-R_CTRL-R|, |c_CTRL-R_CTRL-O|.
|
||||
- Fix the way to detect the current platform. For Mac OS X, it
|
||||
depended on some assumptions. Thanks for someone who wrote about
|
||||
this bug at the Vim Tips Wiki.
|
||||
|
||||
0.2.1 2008-10-24T16:18:32+09:00 *fakeclip-changelog-0.2.1*
|
||||
- Refactor.
|
||||
- Support the paste buffer of GNU screen as a pseudo register.
|
||||
|
||||
0.2.0 2008-07-14T14:09:49+09:00 *fakeclip-changelog-0.2.0*
|
||||
- Rename as "fakeclip" (the old name is "cygclip").
|
||||
- Support Mac OS X.
|
||||
- Autoloaded.
|
||||
|
||||
0.1 2007-12-27T22:47:34+09:00 *fakeclip-changelog-0.1*
|
||||
- Modify to automatically define the default key mappings as this
|
||||
plugin is loaded. See |g:fakeclip_no_default_key_mappings| for how
|
||||
to suppress this behavior.
|
||||
|
||||
0.0 2007-08-13 *fakeclip-changelog-0.0*
|
||||
- First release.
|
||||
|
||||
|
||||
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help:norl:fen:fdl=0:fdm=marker:
|
74
vim_plugin_candinates_src/vim-fakeclip-0.2.10/doc/tags
Normal file
74
vim_plugin_candinates_src/vim-fakeclip-0.2.10/doc/tags
Normal file
@ -0,0 +1,74 @@
|
||||
:FakeclipDefaultKeyMappings fakeclip.txt /*:FakeclipDefaultKeyMappings*
|
||||
<Plug>(fakeclip-D) fakeclip.txt /*<Plug>(fakeclip-D)*
|
||||
<Plug>(fakeclip-P) fakeclip.txt /*<Plug>(fakeclip-P)*
|
||||
<Plug>(fakeclip-Y) fakeclip.txt /*<Plug>(fakeclip-Y)*
|
||||
<Plug>(fakeclip-[P) fakeclip.txt /*<Plug>(fakeclip-[P)*
|
||||
<Plug>(fakeclip-[p) fakeclip.txt /*<Plug>(fakeclip-[p)*
|
||||
<Plug>(fakeclip-]P) fakeclip.txt /*<Plug>(fakeclip-]P)*
|
||||
<Plug>(fakeclip-]p) fakeclip.txt /*<Plug>(fakeclip-]p)*
|
||||
<Plug>(fakeclip-d) fakeclip.txt /*<Plug>(fakeclip-d)*
|
||||
<Plug>(fakeclip-dd) fakeclip.txt /*<Plug>(fakeclip-dd)*
|
||||
<Plug>(fakeclip-gP) fakeclip.txt /*<Plug>(fakeclip-gP)*
|
||||
<Plug>(fakeclip-gp) fakeclip.txt /*<Plug>(fakeclip-gp)*
|
||||
<Plug>(fakeclip-p) fakeclip.txt /*<Plug>(fakeclip-p)*
|
||||
<Plug>(fakeclip-screen-D) fakeclip.txt /*<Plug>(fakeclip-screen-D)*
|
||||
<Plug>(fakeclip-screen-P) fakeclip.txt /*<Plug>(fakeclip-screen-P)*
|
||||
<Plug>(fakeclip-screen-Y) fakeclip.txt /*<Plug>(fakeclip-screen-Y)*
|
||||
<Plug>(fakeclip-screen-[P) fakeclip.txt /*<Plug>(fakeclip-screen-[P)*
|
||||
<Plug>(fakeclip-screen-[p) fakeclip.txt /*<Plug>(fakeclip-screen-[p)*
|
||||
<Plug>(fakeclip-screen-]P) fakeclip.txt /*<Plug>(fakeclip-screen-]P)*
|
||||
<Plug>(fakeclip-screen-]p) fakeclip.txt /*<Plug>(fakeclip-screen-]p)*
|
||||
<Plug>(fakeclip-screen-d) fakeclip.txt /*<Plug>(fakeclip-screen-d)*
|
||||
<Plug>(fakeclip-screen-dd) fakeclip.txt /*<Plug>(fakeclip-screen-dd)*
|
||||
<Plug>(fakeclip-screen-gP) fakeclip.txt /*<Plug>(fakeclip-screen-gP)*
|
||||
<Plug>(fakeclip-screen-gp) fakeclip.txt /*<Plug>(fakeclip-screen-gp)*
|
||||
<Plug>(fakeclip-screen-p) fakeclip.txt /*<Plug>(fakeclip-screen-p)*
|
||||
<Plug>(fakeclip-screen-y) fakeclip.txt /*<Plug>(fakeclip-screen-y)*
|
||||
<Plug>(fakeclip-y) fakeclip.txt /*<Plug>(fakeclip-y)*
|
||||
c_<Plug>(fakeclip-insert) fakeclip.txt /*c_<Plug>(fakeclip-insert)*
|
||||
c_<Plug>(fakeclip-insert-o) fakeclip.txt /*c_<Plug>(fakeclip-insert-o)*
|
||||
c_<Plug>(fakeclip-insert-r) fakeclip.txt /*c_<Plug>(fakeclip-insert-r)*
|
||||
c_<Plug>(fakeclip-screen-insert) fakeclip.txt /*c_<Plug>(fakeclip-screen-insert)*
|
||||
c_<Plug>(fakeclip-screen-insert-o) fakeclip.txt /*c_<Plug>(fakeclip-screen-insert-o)*
|
||||
c_<Plug>(fakeclip-screen-insert-r) fakeclip.txt /*c_<Plug>(fakeclip-screen-insert-r)*
|
||||
fakeclip fakeclip.txt /*fakeclip*
|
||||
fakeclip-bugs fakeclip.txt /*fakeclip-bugs*
|
||||
fakeclip-changelog fakeclip.txt /*fakeclip-changelog*
|
||||
fakeclip-changelog-0.0 fakeclip.txt /*fakeclip-changelog-0.0*
|
||||
fakeclip-changelog-0.1 fakeclip.txt /*fakeclip-changelog-0.1*
|
||||
fakeclip-changelog-0.2.0 fakeclip.txt /*fakeclip-changelog-0.2.0*
|
||||
fakeclip-changelog-0.2.1 fakeclip.txt /*fakeclip-changelog-0.2.1*
|
||||
fakeclip-changelog-0.2.10 fakeclip.txt /*fakeclip-changelog-0.2.10*
|
||||
fakeclip-changelog-0.2.2 fakeclip.txt /*fakeclip-changelog-0.2.2*
|
||||
fakeclip-changelog-0.2.3 fakeclip.txt /*fakeclip-changelog-0.2.3*
|
||||
fakeclip-changelog-0.2.4 fakeclip.txt /*fakeclip-changelog-0.2.4*
|
||||
fakeclip-changelog-0.2.5 fakeclip.txt /*fakeclip-changelog-0.2.5*
|
||||
fakeclip-changelog-0.2.6 fakeclip.txt /*fakeclip-changelog-0.2.6*
|
||||
fakeclip-changelog-0.2.7 fakeclip.txt /*fakeclip-changelog-0.2.7*
|
||||
fakeclip-changelog-0.2.8 fakeclip.txt /*fakeclip-changelog-0.2.8*
|
||||
fakeclip-changelog-0.2.9 fakeclip.txt /*fakeclip-changelog-0.2.9*
|
||||
fakeclip-contents fakeclip.txt /*fakeclip-contents*
|
||||
fakeclip-interface fakeclip.txt /*fakeclip-interface*
|
||||
fakeclip-introduction fakeclip.txt /*fakeclip-introduction*
|
||||
fakeclip-key-mappings fakeclip.txt /*fakeclip-key-mappings*
|
||||
fakeclip-multibyte-on-mac fakeclip.txt /*fakeclip-multibyte-on-mac*
|
||||
fakeclip-variables fakeclip.txt /*fakeclip-variables*
|
||||
fakeclip.txt fakeclip.txt /*fakeclip.txt*
|
||||
g:fakeclip_no_default_key_mappings fakeclip.txt /*g:fakeclip_no_default_key_mappings*
|
||||
g:fakeclip_terminal_multiplexer_type fakeclip.txt /*g:fakeclip_terminal_multiplexer_type*
|
||||
i_<Plug>(fakeclip-insert) fakeclip.txt /*i_<Plug>(fakeclip-insert)*
|
||||
i_<Plug>(fakeclip-insert-o) fakeclip.txt /*i_<Plug>(fakeclip-insert-o)*
|
||||
i_<Plug>(fakeclip-insert-p) fakeclip.txt /*i_<Plug>(fakeclip-insert-p)*
|
||||
i_<Plug>(fakeclip-insert-r) fakeclip.txt /*i_<Plug>(fakeclip-insert-r)*
|
||||
i_<Plug>(fakeclip-screen-insert) fakeclip.txt /*i_<Plug>(fakeclip-screen-insert)*
|
||||
i_<Plug>(fakeclip-screen-insert-o) fakeclip.txt /*i_<Plug>(fakeclip-screen-insert-o)*
|
||||
i_<Plug>(fakeclip-screen-insert-p) fakeclip.txt /*i_<Plug>(fakeclip-screen-insert-p)*
|
||||
i_<Plug>(fakeclip-screen-insert-r) fakeclip.txt /*i_<Plug>(fakeclip-screen-insert-r)*
|
||||
v_<Plug>(fakeclip-D) fakeclip.txt /*v_<Plug>(fakeclip-D)*
|
||||
v_<Plug>(fakeclip-Y) fakeclip.txt /*v_<Plug>(fakeclip-Y)*
|
||||
v_<Plug>(fakeclip-d) fakeclip.txt /*v_<Plug>(fakeclip-d)*
|
||||
v_<Plug>(fakeclip-screen-D) fakeclip.txt /*v_<Plug>(fakeclip-screen-D)*
|
||||
v_<Plug>(fakeclip-screen-Y) fakeclip.txt /*v_<Plug>(fakeclip-screen-Y)*
|
||||
v_<Plug>(fakeclip-screen-d) fakeclip.txt /*v_<Plug>(fakeclip-screen-d)*
|
||||
v_<Plug>(fakeclip-screen-y) fakeclip.txt /*v_<Plug>(fakeclip-screen-y)*
|
||||
v_<Plug>(fakeclip-y) fakeclip.txt /*v_<Plug>(fakeclip-y)*
|
433
vim_plugin_candinates_src/vim-fakeclip-0.2.10/mduem/Makefile
Normal file
433
vim_plugin_candinates_src/vim-fakeclip-0.2.10/mduem/Makefile
Normal file
@ -0,0 +1,433 @@
|
||||
# mduem - Little utility for little software development
|
||||
#
|
||||
# This is a library Makefile to maintain software development, especially for
|
||||
# Vim script. Note that this Makefile requires GNU make to use.
|
||||
# Coding Rules #{{{1
|
||||
#
|
||||
# - Use non-empty string as true and empty string as false.
|
||||
#
|
||||
#
|
||||
# Naming Rules:
|
||||
#
|
||||
# - Use UPPER_CASE variables to be configured by user.
|
||||
#
|
||||
# - Use lower_case variables for internal use of mduem.
|
||||
#
|
||||
# - Use suffix "_p" to indicate that a boolean value is resulted from
|
||||
# a variable.
|
||||
# Example: SHOULD_INSTALL_ASIS_P
|
||||
#
|
||||
# - Use noun for ordinary variables.
|
||||
# Example: repos_name, TARGETS_GENERATED
|
||||
#
|
||||
# - Use verb for variables as functions.
|
||||
# Example: resolve_dep_uri, RENAME_TARGET
|
||||
#
|
||||
# - Use prefix "generate_rule_" for variables to generate make rules.
|
||||
# Example: generate_rule_to_install_a_target
|
||||
#
|
||||
# - Use abbreviations for words which names are too long to code.
|
||||
# Example: dependency => dep, directory => dir, repository => repos
|
||||
#
|
||||
# - Use lower-case names for phony targets.
|
||||
#
|
||||
# - Use verb for phony targets.
|
||||
# Example: clean, install, pack, ...
|
||||
#
|
||||
# - Use hyphens to join words in names of phony targets.
|
||||
# Example: clean-junks, fetch-deps
|
||||
#
|
||||
# - Use prefix "," for names of files which are automatically generated by
|
||||
# mduem and they are temporary ones.
|
||||
# Example: test/,good-case.output
|
||||
#
|
||||
# - Use directory ".mduem" to contain stuffs for internal use.
|
||||
# Example: .mduem/cache/
|
||||
#
|
||||
# - All rules may be violated if there is a strong custom from old times.
|
||||
# Example: all (phony target)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Common #{{{1
|
||||
|
||||
# Use "all" as the default target if no targets were specified on the command
|
||||
# line or any other rules were defined before including this Makefile.
|
||||
.DEFAULT_GOAL := all
|
||||
all:
|
||||
|
||||
SHELL := /bin/bash
|
||||
this_makefile := $(lastword $(MAKEFILE_LIST))
|
||||
cache_makefile := .mduem/cache/Makefile.variables
|
||||
user_makefiles := $(filter-out \
|
||||
$(this_makefile) $(cache_makefile), \
|
||||
$(MAKEFILE_LIST))
|
||||
|
||||
not = $(if $(1),,t)
|
||||
toplevel_dir := $(shell git rev-parse --show-toplevel 2>/dev/null)
|
||||
inner_dir := $(shell git rev-parse --show-prefix 2>/dev/null)
|
||||
git_controlled_p := $(toplevel_dir)
|
||||
toplevel_dir_p := $(and $(git_controlled_p),$(call not,$(inner_dir)))
|
||||
|
||||
ifneq '$(git_controlled_p)' ''
|
||||
$(cache_makefile): \
|
||||
$(toplevel_dir)/.git/config \
|
||||
$(toplevel_dir)/.git/index \
|
||||
$(this_makefile)
|
||||
@echo 'GENERATE $@'
|
||||
@mkdir -p '$(dir $@)'
|
||||
@{ \
|
||||
current_branch="$$(git symbolic-ref -q HEAD \
|
||||
| sed -e 's|^refs/heads/||')"; \
|
||||
_origin_name="$$(git config "branch.$$current_branch.remote")"; \
|
||||
origin_name="$${_origin_name:-origin}"; \
|
||||
_origin_uri="$$(git config "remote.$$origin_name.url")"; \
|
||||
origin_uri="$${_origin_uri:-../.}"; \
|
||||
\
|
||||
echo "all_files_in_repos := \
|
||||
$(filter-out .gitmodules \
|
||||
$(shell cd $(toplevel_dir) && \
|
||||
git submodule foreach 'echo "$$path"'),\
|
||||
$(shell git ls-files))"; \
|
||||
echo "current_branch := $${current_branch}"; \
|
||||
echo "origin_name := $${origin_name}"; \
|
||||
echo "origin_uri := $${origin_uri}"; \
|
||||
echo 'repos_name := $(notdir $(shell pwd))'; \
|
||||
echo 'version := $(shell git describe --tags --always --dirty)'; \
|
||||
} >'$@'
|
||||
endif
|
||||
include $(cache_makefile)
|
||||
|
||||
# The type of a repository. It must be one of the following values:
|
||||
#
|
||||
# generic For any software.
|
||||
# vim-script For Vim plugins, etc.
|
||||
REPOS_TYPE ?= $(if $(filter vim-%,$(repos_name)),vim-script,generic)
|
||||
vim_script_repos_p := $(filter vim-script,$(REPOS_TYPE))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# all #{{{1
|
||||
|
||||
.PHONY: all
|
||||
all: build
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# build #{{{1
|
||||
|
||||
TARGETS_ARCHIVED ?= $(all_files_in_repos)
|
||||
TARGETS_GENERATED ?=# Empty
|
||||
TARGETS_STATIC ?=# Empty
|
||||
|
||||
targets_all_installed := $(TARGETS_GENERATED) $(TARGETS_STATIC)
|
||||
targets_all_archived := $(sort \
|
||||
$(TARGETS_ARCHIVED) \
|
||||
$(targets_all_installed) \
|
||||
$(cache_makefile) \
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
.PHONY: build
|
||||
build: $(targets_all_installed)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# clean #{{{1
|
||||
|
||||
.PHONY: clean
|
||||
clean: clean-generated clean-junks
|
||||
|
||||
.PHONY: clean-generated
|
||||
clean-generated:
|
||||
@echo 'CLEAN-GENERATED'
|
||||
@rm -rf $(TARGETS_GENERATED)
|
||||
@find -name '.mduem' | xargs rm -rf
|
||||
|
||||
.PHONY: clean-junks
|
||||
clean-junks:
|
||||
@echo 'CLEAN-JUNKS'
|
||||
@find -name '*~' -or -name ',*' | xargs rm -rf
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# fetch-deps #{{{1
|
||||
|
||||
DEPS ?=# Empty
|
||||
vim_script_deps := $(if $(vim_script_repos_p),vim-vspec vimup,)
|
||||
all_deps := $(vim_script_deps) $(DEPS)
|
||||
|
||||
DEP_vim_vspec_URI ?= ../vim-vspec
|
||||
DEP_vim_vspec_VERSION ?= 0.0.3
|
||||
|
||||
DEP_vimup_URI ?= ../vimup
|
||||
DEP_vimup_VERSION ?= 0.0.1
|
||||
|
||||
|
||||
# BUGS: This resolves "../" just once, but it's enough for usual cases.
|
||||
resolve_dep_uri = $(strip $(if $(filter ../%,$(1)), \
|
||||
$(dir $(origin_uri))$(1:../%=%), \
|
||||
$(1)))
|
||||
normalize_dep_name = $(subst -,_,$(1))
|
||||
get_dep_raw_uri = $(DEP_$(call normalize_dep_name,$(1))_URI)
|
||||
get_dep_dir_name = $(patsubst %.git,%,$(notdir $(call get_dep_uri,$(1))))
|
||||
|
||||
get_dep_uri = $(call resolve_dep_uri,$(call get_dep_raw_uri,$(1)))
|
||||
get_dep_version = $(DEP_$(call normalize_dep_name,$(1))_VERSION)
|
||||
get_dep_dir = .mduem/deps/$(call get_dep_dir_name,$(1))
|
||||
|
||||
|
||||
|
||||
|
||||
.PHONY: fetch-deps
|
||||
fetch-deps: $(all_deps:%=.mduem/deps/,%)
|
||||
|
||||
# FIXME: Update for changes on only DEPS and other values.
|
||||
.mduem/deps/,%: $(user_makefiles)
|
||||
@echo 'FETCH-DEP $*'
|
||||
@mkdir -p '$(dir $@)'
|
||||
@ ( \
|
||||
if [ -d '$(call get_dep_dir,$*)' ] \
|
||||
; then \
|
||||
cd './$(call get_dep_dir,$*)' \
|
||||
&& git fetch \
|
||||
&& git checkout -f mduem-master \
|
||||
; else \
|
||||
git clone '$(call get_dep_uri,$*)' '$(call get_dep_dir,$*)'\
|
||||
&& cd './$(call get_dep_dir,$*)' \
|
||||
&& git checkout -b mduem-master \
|
||||
; fi \
|
||||
&& git reset --hard '$(call get_dep_version,$*)' \
|
||||
; ) &>'$@.log' \
|
||||
|| { cat '$@.log'; false; }
|
||||
@touch '$@'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# install #{{{1
|
||||
# Core #{{{2
|
||||
|
||||
INSTALLATION_DIR ?= $(error Please set INSTALLATION_DIR)
|
||||
|
||||
RENAME_TARGET ?= $(patsubst %,$(INSTALLATION_DIR)/%,$(1))
|
||||
SHOULD_INSTALL_ASIS_P ?=# All files are version-filtered by default.
|
||||
|
||||
|
||||
|
||||
|
||||
.PHONY: install
|
||||
install: build
|
||||
|
||||
|
||||
define generate_rule_to_install_a_target # (build_target, install_target)
|
||||
install: $(2)
|
||||
$(2): $(1)
|
||||
@echo 'INSTALL $(1)'
|
||||
@mkdir -p '$(dir $(2))'
|
||||
@cp '--preserve=mode,ownership' '$(1)' '$(2)'
|
||||
ifeq '$(call SHOULD_INSTALL_ASIS_P,$(1))' ''
|
||||
@sed -i -e 's/0.2.10/$(version)/' '$(2)'
|
||||
endif
|
||||
|
||||
endef
|
||||
$(eval \
|
||||
$(foreach t, \
|
||||
$(targets_all_installed), \
|
||||
$(call generate_rule_to_install_a_target,$(t),$(call RENAME_TARGET,$(t)))))
|
||||
|
||||
|
||||
# This should be placed at the last to ensure that post-install is executed
|
||||
# after any other rules to install.
|
||||
install: post-install
|
||||
|
||||
|
||||
|
||||
|
||||
# post-install #{{{2
|
||||
|
||||
TARGETS_POST_INSTALL ?=# Empty
|
||||
targets_post_install_builtin :=# Empty
|
||||
|
||||
|
||||
ifneq '$(vim_script_repos_p)' ''
|
||||
target_vim_helptags := $(call RENAME_TARGET,doc/tags)
|
||||
$(target_vim_helptags): $(filter doc/%.txt,$(targets_all_installed))
|
||||
@echo 'POST-INSTALL vim helptags'
|
||||
@vim -n -N -u NONE -U NONE -e -c 'helptags $(dir $@) | qall!'
|
||||
|
||||
targets_post_install_builtin += $(target_vim_helptags)
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: post-install
|
||||
post-install: $(targets_post_install_builtin) $(TARGETS_POST_INSTALL)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# pack #{{{1
|
||||
|
||||
archive_basename = $(repos_name)-$(version)
|
||||
archive_name = $(archive_basename).zip
|
||||
|
||||
|
||||
.PHONY: pack
|
||||
pack: $(archive_name)
|
||||
|
||||
$(archive_name): $(cache_makefile)
|
||||
rm -rf '$(archive_basename)' '$(archive_name)'
|
||||
$(MAKE) \
|
||||
'INSTALLATION_DIR=$(archive_basename)' \
|
||||
'targets_all_installed=$(targets_all_archived)' \
|
||||
install
|
||||
zip -r $(archive_name) $(archive_basename)/
|
||||
rm -rf '$(archive_basename)'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# release #{{{1
|
||||
|
||||
.PHONY: release
|
||||
release: $(if $(vim_script_repos_p),release-vim-script,release-default)
|
||||
|
||||
|
||||
.PHONY: release-default
|
||||
release-default:
|
||||
@echo 'Rules to release are not defined.'
|
||||
|
||||
|
||||
.PHONY: release-vim-script
|
||||
release-vim-script: fetch-deps $(repos_name).vimup pack
|
||||
./.mduem/deps/vimup/vimup update-script $(repos_name)
|
||||
rm $(repos_name).vimup
|
||||
|
||||
.PHONY: release-new-vim-script
|
||||
release-new-vim-script: fetch-deps $(repos_name).vimup pack
|
||||
./.mduem/deps/vimup/vimup new-script $(repos_name)
|
||||
rm $(repos_name).vimup
|
||||
|
||||
$(repos_name).vimup: $(firstword $(sort $(filter doc/%.txt, \
|
||||
$(all_files_in_repos))))
|
||||
./.mduem/deps/vimup/vimup-info-generator \
|
||||
<$< \
|
||||
>$(repos_name).vimup
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# test #{{{1
|
||||
|
||||
test_cases := $(patsubst test/%.expected,%, \
|
||||
$(filter test/%.expected,$(all_files_in_repos)))
|
||||
|
||||
|
||||
default_test_rule_deps := $(MAKEFILE_LIST)
|
||||
define default_test_rule
|
||||
source './$<' &>'$@' || { cat '$@'; false; }
|
||||
endef
|
||||
|
||||
ifneq '$(vim_script_repos_p)' ''
|
||||
all_vim_scripts := $(filter %.vim,$(all_files_in_repos))
|
||||
vim_script_test_rule_deps := .mduem/deps/vim-vspec/bin/vspec $(all_vim_scripts)
|
||||
define vim_script_test_rule
|
||||
./$(call get_dep_dir,vim-vspec)/bin/vspec \
|
||||
$< \
|
||||
"$$PWD" \
|
||||
$(foreach d,$(all_deps),$(call get_dep_dir,$(d))) \
|
||||
&>$@
|
||||
endef
|
||||
endif
|
||||
|
||||
TEST_RULE ?= $(if $(vim_script_repos_p), \
|
||||
$(vim_script_test_rule), \
|
||||
$(default_test_rule))
|
||||
TEST_RULE_DEPS ?=# Empty
|
||||
|
||||
builtin_test_rule_deps := $(if $(vim_script_repos_p), \
|
||||
$(vim_script_test_rule_deps), \
|
||||
$(default_test_rule_deps))
|
||||
all_test_rule_deps := $(builtin_test_rule_deps) $(TEST_RULE_DEPS)
|
||||
|
||||
|
||||
|
||||
|
||||
.PHONY: test
|
||||
test: fetch-deps test/,ok
|
||||
|
||||
test/,ok: $(test_cases:%=test/,%.ok)
|
||||
@echo 'ALL TESTS ARE PASSED.'
|
||||
@touch $@
|
||||
|
||||
test/,%.ok: test/%.input $(all_test_rule_deps)
|
||||
@echo -n 'TEST $* ... '
|
||||
@$(MAKE) --silent '$(@:.ok=.diff)'
|
||||
@if ! [ -s $(@:.ok=.diff) ]; then \
|
||||
echo 'OK'; \
|
||||
else \
|
||||
echo 'FAILED'; \
|
||||
cat $(@:.ok=.diff); \
|
||||
echo 'END'; \
|
||||
false; \
|
||||
fi
|
||||
@touch $@
|
||||
|
||||
test/,%.diff: test/%.expected test/,%.output
|
||||
@diff -u $^ >$@; true
|
||||
|
||||
test/,%.output: test/%.input $(all_test_rule_deps)
|
||||
@$(TEST_RULE)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# __END__ #{{{1
|
||||
# vim: foldmethod=marker
|
@ -0,0 +1,273 @@
|
||||
" fakeclip - pseude clipboard register for non-GUI version of Vim
|
||||
" Version: 0.2.10
|
||||
" Copyright (C) 2007-2012 Kana Natsuno <http://whileimautomaton.net/>
|
||||
" License: So-called MIT/X license {{{
|
||||
" Permission is hereby granted, free of charge, to any person obtaining
|
||||
" a copy of this software and associated documentation files (the
|
||||
" "Software"), to deal in the Software without restriction, including
|
||||
" without limitation the rights to use, copy, modify, merge, publish,
|
||||
" distribute, sublicense, and/or sell copies of the Software, and to
|
||||
" permit persons to whom the Software is furnished to do so, subject to
|
||||
" the following conditions:
|
||||
"
|
||||
" The above copyright notice and this permission notice shall be included
|
||||
" in all copies or substantial portions of the Software.
|
||||
"
|
||||
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
" }}}
|
||||
" Prologue "{{{1
|
||||
|
||||
if exists('g:loaded_fakeclip')
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
" Key Mappings "{{{1
|
||||
" Interface key mappings "{{{2
|
||||
|
||||
nnoremap <silent> <Plug>(fakeclip-y)
|
||||
\ :<C-u>set operatorfunc=fakeclip#clipboard_yank<Return>g@
|
||||
vnoremap <silent> <Plug>(fakeclip-y)
|
||||
\ :<C-u>call fakeclip#yank('clipboard', visualmode())<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-Y)
|
||||
\ :<C-u>call fakeclip#yank_Y('clipboard')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-Y)
|
||||
\ :<C-u>call fakeclip#yank('clipboard', 'V')<Return>
|
||||
|
||||
nnoremap <silent> <Plug>(fakeclip-p)
|
||||
\ :<C-u>call fakeclip#put('clipboard', '', 'p')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-P)
|
||||
\ :<C-u>call fakeclip#put('clipboard', '', 'P')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-gp)
|
||||
\ :<C-u>call fakeclip#put('clipboard', '', 'gp')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-gP)
|
||||
\ :<C-u>call fakeclip#put('clipboard', '', 'gP')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-]p)
|
||||
\ :<C-u>call fakeclip#put('clipboard', '', ']p')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-]P)
|
||||
\ :<C-u>call fakeclip#put('clipboard', '', ']P')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-[p)
|
||||
\ :<C-u>call fakeclip#put('clipboard', '', '[p')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-[P)
|
||||
\ :<C-u>call fakeclip#put('clipboard', '', '[P')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-p)
|
||||
\ :<C-u>call fakeclip#put('clipboard', visualmode(), 'p')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-P)
|
||||
\ :<C-u>call fakeclip#put('clipboard', visualmode(), 'P')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-gp)
|
||||
\ :<C-u>call fakeclip#put('clipboard', visualmode(), 'gp')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-gP)
|
||||
\ :<C-u>call fakeclip#put('clipboard', visualmode(), 'gP')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-]p)
|
||||
\ :<C-u>call fakeclip#put('clipboard', visualmode(), ']p')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-]P)
|
||||
\ :<C-u>call fakeclip#put('clipboard', visualmode(), ']P')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-[p)
|
||||
\ :<C-u>call fakeclip#put('clipboard', visualmode(), '[p')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-[P)
|
||||
\ :<C-u>call fakeclip#put('clipboard', visualmode(), '[P')<Return>
|
||||
|
||||
noremap! <Plug>(fakeclip-insert)
|
||||
\ <C-r>=fakeclip#content('clipboard')<Return>
|
||||
noremap! <Plug>(fakeclip-insert-r)
|
||||
\ <C-r><C-r>=fakeclip#content('clipboard')<Return>
|
||||
noremap! <Plug>(fakeclip-insert-o)
|
||||
\ <C-r><C-o>=fakeclip#content('clipboard')<Return>
|
||||
inoremap <Plug>(fakeclip-insert-p)
|
||||
\ <C-r><C-p>=fakeclip#content('clipboard')<Return>
|
||||
|
||||
nnoremap <silent> <Plug>(fakeclip-d)
|
||||
\ :<C-u>set operatorfunc=fakeclip#clipboard_delete<Return>g@
|
||||
vnoremap <silent> <Plug>(fakeclip-d)
|
||||
\ :<C-u>call fakeclip#delete('clipboard', visualmode())<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-dd)
|
||||
\ :<C-u>set operatorfunc=fakeclip#clipboard_delete<Return>g@g@
|
||||
nnoremap <silent> <Plug>(fakeclip-D)
|
||||
\ :<C-u>set operatorfunc=fakeclip#clipboard_delete<Return>g@$
|
||||
vnoremap <silent> <Plug>(fakeclip-D)
|
||||
\ :<C-u>call fakeclip#delete('clipboard', 'V')<Return>
|
||||
|
||||
|
||||
nnoremap <silent> <Plug>(fakeclip-screen-y)
|
||||
\ :<C-u>set operatorfunc=fakeclip#pastebuffer_yank<Return>g@
|
||||
vnoremap <silent> <Plug>(fakeclip-screen-y)
|
||||
\ :<C-u>call fakeclip#yank('pastebuffer', visualmode())<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-screen-Y)
|
||||
\ :<C-u>call fakeclip#yank_Y('pastebuffer')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-screen-Y)
|
||||
\ :<C-u>call fakeclip#yank('pastebuffer', 'V')<Return>
|
||||
|
||||
nnoremap <silent> <Plug>(fakeclip-screen-p)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', '', 'p')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-screen-P)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', '', 'P')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-screen-gp)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', '', 'gp')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-screen-gP)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', '', 'gP')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-screen-]p)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', '', ']p')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-screen-]P)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', '', ']P')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-screen-[p)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', '', '[p')<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-screen-[P)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', '', '[P')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-screen-p)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', visualmode(), 'p')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-screen-P)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', visualmode(), 'P')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-screen-gp)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', visualmode(), 'gp')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-screen-gP)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', visualmode(), 'gP')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-screen-]p)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', visualmode(), ']p')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-screen-]P)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', visualmode(), ']P')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-screen-[p)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', visualmode(), '[p')<Return>
|
||||
vnoremap <silent> <Plug>(fakeclip-screen-[P)
|
||||
\ :<C-u>call fakeclip#put('pastebuffer', visualmode(), '[P')<Return>
|
||||
|
||||
noremap! <Plug>(fakeclip-screen-insert)
|
||||
\ <C-r>=fakeclip#content('pastebuffer')<Return>
|
||||
noremap! <Plug>(fakeclip-screen-insert-r)
|
||||
\ <C-r><C-r>=fakeclip#content('pastebuffer')<Return>
|
||||
noremap! <Plug>(fakeclip-screen-insert-o)
|
||||
\ <C-r><C-o>=fakeclip#content('pastebuffer')<Return>
|
||||
inoremap <Plug>(fakeclip-screen-insert-p)
|
||||
\ <C-r><C-p>=fakeclip#content('pastebuffer')<Return>
|
||||
|
||||
nnoremap <silent> <Plug>(fakeclip-screen-d)
|
||||
\ :<C-u>set operatorfunc=fakeclip#pastebuffer_delete<Return>g@
|
||||
vnoremap <silent> <Plug>(fakeclip-screen-d)
|
||||
\ :<C-u>call fakeclip#delete('pastebuffer', visualmode())<Return>
|
||||
nnoremap <silent> <Plug>(fakeclip-screen-dd)
|
||||
\ :<C-u>set operatorfunc=fakeclip#pastebuffer_delete<Return>g@g@
|
||||
nnoremap <silent> <Plug>(fakeclip-screen-D)
|
||||
\ :<C-u>set operatorfunc=fakeclip#pastebuffer_delete<Return>g@$
|
||||
vnoremap <silent> <Plug>(fakeclip-screen-D)
|
||||
\ :<C-u>call fakeclip#delete('pastebuffer', 'V')<Return>
|
||||
|
||||
|
||||
|
||||
|
||||
" Default key mappings "{{{2
|
||||
|
||||
command! -bang -bar -nargs=0 FakeclipDefaultKeyMappings
|
||||
\ call s:cmd_FakeclipDefaultKeyMappings(<bang>0)
|
||||
|
||||
function! s:cmd_FakeclipDefaultKeyMappings(banged_p)
|
||||
let modifier = a:banged_p ? '' : '<unique>'
|
||||
" Clipboard
|
||||
if !has('clipboard')
|
||||
for _ in ['+', '*']
|
||||
execute 'silent! nmap '.modifier.' "'._.'y <Plug>(fakeclip-y)'
|
||||
execute 'silent! nmap '.modifier.' "'._.'Y <Plug>(fakeclip-Y)'
|
||||
execute 'silent! nmap '.modifier.' "'._.'yy <Plug>(fakeclip-Y)'
|
||||
execute 'silent! vmap '.modifier.' "'._.'y <Plug>(fakeclip-y)'
|
||||
execute 'silent! vmap '.modifier.' "'._.'Y <Plug>(fakeclip-Y)'
|
||||
|
||||
execute 'silent! nmap '.modifier.' "'._.'p <Plug>(fakeclip-p)'
|
||||
execute 'silent! nmap '.modifier.' "'._.'P <Plug>(fakeclip-P)'
|
||||
execute 'silent! nmap '.modifier.' "'._.'gp <Plug>(fakeclip-gp)'
|
||||
execute 'silent! nmap '.modifier.' "'._.'gP <Plug>(fakeclip-gP)'
|
||||
execute 'silent! nmap '.modifier.' "'._.']p <Plug>(fakeclip-]p)'
|
||||
execute 'silent! nmap '.modifier.' "'._.']P <Plug>(fakeclip-]P)'
|
||||
execute 'silent! nmap '.modifier.' "'._.'[p <Plug>(fakeclip-[p)'
|
||||
execute 'silent! nmap '.modifier.' "'._.'[P <Plug>(fakeclip-[P)'
|
||||
execute 'silent! vmap '.modifier.' "'._.'p <Plug>(fakeclip-p)'
|
||||
execute 'silent! vmap '.modifier.' "'._.'P <Plug>(fakeclip-P)'
|
||||
execute 'silent! vmap '.modifier.' "'._.'gp <Plug>(fakeclip-gp)'
|
||||
execute 'silent! vmap '.modifier.' "'._.'gP <Plug>(fakeclip-gP)'
|
||||
execute 'silent! vmap '.modifier.' "'._.']p <Plug>(fakeclip-]p)'
|
||||
execute 'silent! vmap '.modifier.' "'._.']P <Plug>(fakeclip-]P)'
|
||||
execute 'silent! vmap '.modifier.' "'._.'[p <Plug>(fakeclip-[p)'
|
||||
execute 'silent! vmap '.modifier.' "'._.'[P <Plug>(fakeclip-[P)'
|
||||
|
||||
execute 'silent! map! '.modifier.' <C-r>'._.' <Plug>(fakeclip-insert)'
|
||||
execute 'silent! map! '.modifier.' <C-r><C-r>'._.' <Plug>(fakeclip-insert-r)'
|
||||
execute 'silent! map! '.modifier.' <C-r><C-o>'._.' <Plug>(fakeclip-insert-o)'
|
||||
execute 'silent! imap '.modifier.' <C-r><C-p>'._.' <Plug>(fakeclip-insert-p)'
|
||||
|
||||
execute 'silent! nmap '.modifier.' "'._.'d <Plug>(fakeclip-d)'
|
||||
execute 'silent! vmap '.modifier.' "'._.'d <Plug>(fakeclip-d)'
|
||||
execute 'silent! nmap '.modifier.' "'._.'dd <Plug>(fakeclip-dd)'
|
||||
execute 'silent! nmap '.modifier.' "'._.'D <Plug>(fakeclip-D)'
|
||||
execute 'silent! vmap '.modifier.' "'._.'D <Plug>(fakeclip-D)'
|
||||
endfor
|
||||
endif
|
||||
|
||||
" Paste buffer
|
||||
execute 'silent! nmap '.modifier.' "&y <Plug>(fakeclip-screen-y)'
|
||||
execute 'silent! nmap '.modifier.' "&Y <Plug>(fakeclip-screen-Y)'
|
||||
execute 'silent! nmap '.modifier.' "&yy <Plug>(fakeclip-screen-Y)'
|
||||
execute 'silent! vmap '.modifier.' "&y <Plug>(fakeclip-screen-y)'
|
||||
execute 'silent! vmap '.modifier.' "&Y <Plug>(fakeclip-screen-Y)'
|
||||
|
||||
execute 'silent! nmap '.modifier.' "&p <Plug>(fakeclip-screen-p)'
|
||||
execute 'silent! nmap '.modifier.' "&P <Plug>(fakeclip-screen-P)'
|
||||
execute 'silent! nmap '.modifier.' "&gp <Plug>(fakeclip-screen-gp)'
|
||||
execute 'silent! nmap '.modifier.' "&gP <Plug>(fakeclip-screen-gP)'
|
||||
execute 'silent! nmap '.modifier.' "&]p <Plug>(fakeclip-screen-]p)'
|
||||
execute 'silent! nmap '.modifier.' "&]P <Plug>(fakeclip-screen-]P)'
|
||||
execute 'silent! nmap '.modifier.' "&[p <Plug>(fakeclip-screen-[p)'
|
||||
execute 'silent! nmap '.modifier.' "&[P <Plug>(fakeclip-screen-[P)'
|
||||
execute 'silent! vmap '.modifier.' "&p <Plug>(fakeclip-screen-p)'
|
||||
execute 'silent! vmap '.modifier.' "&P <Plug>(fakeclip-screen-P)'
|
||||
execute 'silent! vmap '.modifier.' "&gp <Plug>(fakeclip-screen-gp)'
|
||||
execute 'silent! vmap '.modifier.' "&gP <Plug>(fakeclip-screen-gP)'
|
||||
execute 'silent! vmap '.modifier.' "&]p <Plug>(fakeclip-screen-]p)'
|
||||
execute 'silent! vmap '.modifier.' "&]P <Plug>(fakeclip-screen-]P)'
|
||||
execute 'silent! vmap '.modifier.' "&[p <Plug>(fakeclip-screen-[p)'
|
||||
execute 'silent! vmap '.modifier.' "&[P <Plug>(fakeclip-screen-[P)'
|
||||
|
||||
execute 'silent! map! '.modifier.' <C-r>& <Plug>(fakeclip-screen-insert)'
|
||||
execute 'silent! map! '.modifier.' <C-r><C-r>& <Plug>(fakeclip-screen-insert-r)'
|
||||
execute 'silent! map! '.modifier.' <C-r><C-o>& <Plug>(fakeclip-screen-insert-o)'
|
||||
execute 'silent! imap '.modifier.' <C-r><C-p>& <Plug>(fakeclip-screen-insert-p)'
|
||||
|
||||
execute 'silent! nmap '.modifier.' "&d <Plug>(fakeclip-screen-d)'
|
||||
execute 'silent! vmap '.modifier.' "&d <Plug>(fakeclip-screen-d)'
|
||||
execute 'silent! nmap '.modifier.' "&dd <Plug>(fakeclip-screen-dd)'
|
||||
execute 'silent! nmap '.modifier.' "&D <Plug>(fakeclip-screen-D)'
|
||||
execute 'silent! vmap '.modifier.' "&D <Plug>(fakeclip-screen-D)'
|
||||
endfunction
|
||||
|
||||
if !exists('g:fakeclip_no_default_key_mappings')
|
||||
FakeclipDefaultKeyMappings
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
" Epilogue "{{{1
|
||||
|
||||
let g:loaded_fakeclip = 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
" __END__ "{{{1
|
||||
" vim: foldmethod=marker foldlevel=0
|
@ -0,0 +1,10 @@
|
||||
==== s_read_clipboard on cygwin
|
||||
|
||||
==== s_write_clipboard on cygwin
|
||||
|
||||
|
||||
|
||||
**** Result ****
|
||||
|
||||
|
||||
0 examples, 0 failures
|
@ -0,0 +1,22 @@
|
||||
" Test: vim-fakeclip clipboard-cygwin
|
||||
runtime! plugin/fakeclip.vim
|
||||
call vspec#hint({
|
||||
\ 'scope': 'fakeclip#_local_variables()',
|
||||
\ 'sid': 'fakeclip#_sid_prefix()',
|
||||
\ })
|
||||
function s:describe__s_read_clipboard__on_cygwin() "{{{1
|
||||
" FIXME
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_write_clipboard__on_cygwin() "{{{1
|
||||
" FIXME
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
" __END__ "{{{1
|
||||
" vim: filetype=vim foldmethod=marker
|
@ -0,0 +1,10 @@
|
||||
==== s_read_clipboard on mac
|
||||
|
||||
==== s_write_clipboard on mac
|
||||
|
||||
|
||||
|
||||
**** Result ****
|
||||
|
||||
|
||||
0 examples, 0 failures
|
@ -0,0 +1,22 @@
|
||||
" Test: vim-fakeclip clipboard-mac
|
||||
runtime! plugin/fakeclip.vim
|
||||
call vspec#hint({
|
||||
\ 'scope': 'fakeclip#_local_variables()',
|
||||
\ 'sid': 'fakeclip#_sid_prefix()',
|
||||
\ })
|
||||
function s:describe__s_read_clipboard__on_mac() "{{{1
|
||||
" FIXME
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_write_clipboard__on_mac() "{{{1
|
||||
" FIXME
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
" __END__ "{{{1
|
||||
" vim: filetype=vim foldmethod=marker
|
@ -0,0 +1,10 @@
|
||||
==== s_read_clipboard on x
|
||||
|
||||
==== s_write_clipboard on x
|
||||
|
||||
|
||||
|
||||
**** Result ****
|
||||
|
||||
|
||||
0 examples, 0 failures
|
@ -0,0 +1,22 @@
|
||||
" Test: vim-fakeclip clipboard-x
|
||||
runtime! plugin/fakeclip.vim
|
||||
call vspec#hint({
|
||||
\ 'scope': 'fakeclip#_local_variables()',
|
||||
\ 'sid': 'fakeclip#_sid_prefix()',
|
||||
\ })
|
||||
function s:describe__s_read_clipboard__on_x() "{{{1
|
||||
" FIXME
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_write_clipboard__on_x() "{{{1
|
||||
" FIXME
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
" __END__ "{{{1
|
||||
" vim: filetype=vim foldmethod=marker
|
@ -0,0 +1,40 @@
|
||||
==== fakeclip_clipboard_yank
|
||||
|
||||
==== fakeclip_content
|
||||
|
||||
==== fakeclip_put
|
||||
|
||||
==== fakeclip_screen_yank
|
||||
|
||||
==== fakeclip_yank
|
||||
|
||||
==== fakeclip_yank_Y
|
||||
|
||||
==== s_count
|
||||
|
||||
==== s_read_clipboard_unknown
|
||||
|
||||
==== s_read_screen if unavailable
|
||||
|
||||
==== s_restore_register
|
||||
|
||||
==== s_save_register
|
||||
|
||||
==== s_select_last_motion with block
|
||||
|
||||
==== s_select_last_motion with char
|
||||
|
||||
==== s_select_last_motion with line
|
||||
|
||||
==== s_select_last_motion with visual
|
||||
|
||||
==== s_write_clipboard_unknown
|
||||
|
||||
==== s_write_screen if unavailable
|
||||
|
||||
|
||||
|
||||
**** Result ****
|
||||
|
||||
|
||||
0 examples, 0 failures
|
127
vim_plugin_candinates_src/vim-fakeclip-0.2.10/test/misc.input
Normal file
127
vim_plugin_candinates_src/vim-fakeclip-0.2.10/test/misc.input
Normal file
@ -0,0 +1,127 @@
|
||||
" Test: vim-fakeclip misc
|
||||
runtime! plugin/fakeclip.vim
|
||||
call vspec#hint({
|
||||
\ 'scope': 'fakeclip#_local_variables()',
|
||||
\ 'sid': 'fakeclip#_sid_prefix()',
|
||||
\ })
|
||||
function s:describe__fakeclip_clipboard_yank() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__fakeclip_content() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__fakeclip_put() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__fakeclip_screen_yank() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__fakeclip_yank() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__fakeclip_yank_Y() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_count() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_read_clipboard_unknown() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_read_screen__if_unavailable() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_restore_register() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_save_register() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_select_last_motion__with_char() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_select_last_motion__with_line() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_select_last_motion__with_block() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_select_last_motion__with_visual() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_write_clipboard_unknown() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_write_screen__if_unavailable() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
" __END__ "{{{1
|
||||
" vim: filetype=vim foldmethod=marker
|
@ -0,0 +1,42 @@
|
||||
==== s_read_pastebuffer
|
||||
---- It should read the paste buffer which contains empty string
|
||||
..
|
||||
---- It should read the paste buffer which contains string without newline
|
||||
..
|
||||
---- It should read the paste buffer which contains single-line string
|
||||
..
|
||||
---- It should read the paste buffer which contains multi-line string
|
||||
..
|
||||
---- It should read the paste buffer which contains multi-line string w/o last LF
|
||||
..
|
||||
---- It should read the paste buffer which is emptied by "register . ''"
|
||||
..
|
||||
|
||||
==== s_read_pastebuffer_gnuscreen
|
||||
---- It should read the paste buffer which contains empty string
|
||||
..
|
||||
---- It should read the paste buffer which contains string without newline
|
||||
..
|
||||
---- It should read the paste buffer which contains single-line string
|
||||
..
|
||||
---- It should read the paste buffer which contains multi-line string
|
||||
..
|
||||
---- It should read the paste buffer which contains multi-line string w/o last LF
|
||||
..
|
||||
---- It should read the paste buffer which is emptied by "register . ''"
|
||||
..
|
||||
|
||||
==== s_write_pastebuffer
|
||||
---- It should succeed
|
||||
.....
|
||||
|
||||
==== s_write_pastebuffer_gnuscreen
|
||||
---- It should succeed
|
||||
.....
|
||||
|
||||
|
||||
|
||||
**** Result ****
|
||||
|
||||
|
||||
34 examples, 0 failures
|
@ -0,0 +1,145 @@
|
||||
" Test: vim-fakeclip pastebuffer-gnuscreen
|
||||
runtime! plugin/fakeclip.vim
|
||||
call vspec#hint({
|
||||
\ 'scope': 'fakeclip#_local_variables()',
|
||||
\ 'sid': 'fakeclip#_sid_prefix()',
|
||||
\ })
|
||||
function! s:write(...) "{{{1
|
||||
let _ = tempname()
|
||||
call writefile(a:000, _, 'b')
|
||||
call system('screen -X readbuf ' . shellescape(_))
|
||||
call delete(_)
|
||||
endfunction
|
||||
let g:fakeclip_delay_to_read_pastebuffer_gnuscreen = '3'
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_read_pastebuffer_gnuscreen() "{{{1
|
||||
It should read the paste buffer which contains empty string
|
||||
|
||||
call s:write('')
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# ''
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# ''
|
||||
|
||||
It should read the paste buffer which contains string without newline
|
||||
|
||||
call s:write('A')
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# 'A'
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# 'A'
|
||||
|
||||
It should read the paste buffer which contains single-line string
|
||||
|
||||
call s:write('B', '')
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# "B\n"
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# "B\n"
|
||||
|
||||
It should read the paste buffer which contains multi-line string
|
||||
|
||||
call s:write('C', 'D', '')
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# "C\nD\n"
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# "C\nD\n"
|
||||
|
||||
It should read the paste buffer which contains multi-line string w/o last LF
|
||||
|
||||
call s:write('E', 'F')
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# "E\nF"
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# "E\nF"
|
||||
|
||||
It should read the paste buffer which is emptied by "register . ''"
|
||||
|
||||
silent !screen -X register . ''
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# ''
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# ''
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_write_pastebuffer_gnuscreen() "{{{1
|
||||
It should succeed
|
||||
|
||||
call Call('s:write_pastebuffer_gnuscreen', [''])
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# ''
|
||||
|
||||
call Call('s:write_pastebuffer_gnuscreen', ['A'])
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# 'A'
|
||||
|
||||
call Call('s:write_pastebuffer_gnuscreen', ['B', ''])
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# "B\n"
|
||||
|
||||
call Call('s:write_pastebuffer_gnuscreen', ['C', 'D', ''])
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# "C\nD\n"
|
||||
|
||||
call Call('s:write_pastebuffer_gnuscreen', ['E', 'F'])
|
||||
Should Call('s:read_pastebuffer_gnuscreen') ==# "E\nF"
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_read_pastebuffer() "{{{1
|
||||
It should read the paste buffer which contains empty string
|
||||
|
||||
call s:write('')
|
||||
Should Call('s:read_pastebuffer') ==# ''
|
||||
Should Call('s:read_pastebuffer') ==# ''
|
||||
|
||||
It should read the paste buffer which contains string without newline
|
||||
|
||||
call s:write('A')
|
||||
Should Call('s:read_pastebuffer') ==# 'A'
|
||||
Should Call('s:read_pastebuffer') ==# 'A'
|
||||
|
||||
It should read the paste buffer which contains single-line string
|
||||
|
||||
call s:write('B', '')
|
||||
Should Call('s:read_pastebuffer') ==# "B\n"
|
||||
Should Call('s:read_pastebuffer') ==# "B\n"
|
||||
|
||||
It should read the paste buffer which contains multi-line string
|
||||
|
||||
call s:write('C', 'D', '')
|
||||
Should Call('s:read_pastebuffer') ==# "C\nD\n"
|
||||
Should Call('s:read_pastebuffer') ==# "C\nD\n"
|
||||
|
||||
It should read the paste buffer which contains multi-line string w/o last LF
|
||||
|
||||
call s:write('E', 'F')
|
||||
Should Call('s:read_pastebuffer') ==# "E\nF"
|
||||
Should Call('s:read_pastebuffer') ==# "E\nF"
|
||||
|
||||
It should read the paste buffer which is emptied by "register . ''"
|
||||
|
||||
silent !screen -X register . ''
|
||||
Should Call('s:read_pastebuffer') ==# ''
|
||||
Should Call('s:read_pastebuffer') ==# ''
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_write_pastebuffer() "{{{1
|
||||
It should succeed
|
||||
|
||||
call Call('s:write_pastebuffer', '')
|
||||
Should Call('s:read_pastebuffer') ==# ''
|
||||
|
||||
call Call('s:write_pastebuffer', 'A')
|
||||
Should Call('s:read_pastebuffer') ==# 'A'
|
||||
|
||||
call Call('s:write_pastebuffer', "B\n")
|
||||
Should Call('s:read_pastebuffer') ==# "B\n"
|
||||
|
||||
call Call('s:write_pastebuffer', "C\nD\n")
|
||||
Should Call('s:read_pastebuffer') ==# "C\nD\n"
|
||||
|
||||
call Call('s:write_pastebuffer', "E\nF")
|
||||
Should Call('s:read_pastebuffer') ==# "E\nF"
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
" __END__ "{{{1
|
||||
" vim: filetype=vim foldmethod=marker
|
@ -0,0 +1,14 @@
|
||||
==== s_read_pastebuffer
|
||||
|
||||
==== s_read_pastebuffer_tmux
|
||||
|
||||
==== s_write_pastebuffer
|
||||
|
||||
==== s_write_pastebuffer_tmux
|
||||
|
||||
|
||||
|
||||
**** Result ****
|
||||
|
||||
|
||||
0 examples, 0 failures
|
@ -0,0 +1,36 @@
|
||||
" Test: vim-fakeclip pastebuffer-tmux
|
||||
runtime! plugin/fakeclip.vim
|
||||
call vspec#hint({
|
||||
\ 'scope': 'fakeclip#_local_variables()',
|
||||
\ 'sid': 'fakeclip#_sid_prefix()',
|
||||
\ })
|
||||
function s:describe__s_read_pastebuffer_tmux() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_write_pastebuffer_tmux() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_read_pastebuffer() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__s_write_pastebuffer() "{{{1
|
||||
" FIXME: NIY
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
" __END__ "{{{1
|
||||
" vim: filetype=vim foldmethod=marker
|
@ -0,0 +1,12 @@
|
||||
==== commands
|
||||
|
||||
==== named_key_mappings
|
||||
|
||||
==== ui_key_mappings
|
||||
|
||||
|
||||
|
||||
**** Result ****
|
||||
|
||||
|
||||
0 examples, 0 failures
|
29
vim_plugin_candinates_src/vim-fakeclip-0.2.10/test/ui.input
Normal file
29
vim_plugin_candinates_src/vim-fakeclip-0.2.10/test/ui.input
Normal file
@ -0,0 +1,29 @@
|
||||
" Test: vim-fakeclip ui
|
||||
runtime! plugin/fakeclip.vim
|
||||
call vspec#hint({
|
||||
\ 'scope': 'fakeclip#_local_variables()',
|
||||
\ 'sid': 'fakeclip#_sid_prefix()',
|
||||
\ })
|
||||
function s:describe__commands() "{{{1
|
||||
" FIXME
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__named_key_mappings() "{{{1
|
||||
" FIXME
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
function s:describe__ui_key_mappings() "{{{1
|
||||
" FIXME
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
" __END__ "{{{1
|
||||
" vim: filetype=vim foldmethod=marker
|
Reference in New Issue
Block a user