This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 指定のデータをレジスタに登録する | |
function! s:Clip(data) | |
let @*=a:data | |
echo "clipped: " . a:data | |
endfunction | |
" 現在開いているファイルのパスをレジスタへ | |
command! -nargs=0 ClipPath call s:Clip(expand('%:p')) | |
" 現在開いているファイルのファイル名をレジスタへ | |
command! -nargs=0 ClipFile call s:Clip(expand('%:t')) | |
" 現在開いているファイルのディレクトリパスをレジスタへ | |
command! -nargs=0 ClipDir call s:Clip(expand('%:p:h')) |
クリップボードと連携しておけば、さらに捗る。
0 件のコメント :
コメントを投稿