Copy the location of the currently active file to the OS clipboard so it may be pasted later (even outside of vim).
[~/.vimrc] :command! FnameRel :r!echo "%:h"/"%:p:t" | pbcopy [vim] :so ~/.vimrc :FnameRelReferences:
- http://vim.wikia.com/wiki/Mac_OS_X_clipboard_sharing
- http://stackoverflow.com/questions/7690891/vim-expand-in-h
- http://vimdoc.sourceforge.net/htmldoc/eval.html#expand%28%29
- http://stackoverflow.com/questions/916875/yank-file-name-path-of-current-buffer-in-vim
- http://stackoverflow.com/questions/803464/how-do-i-source-something-in-my-vimrc-file
- http://stackoverflow.com/questions/3961859/how-to-copy-to-clipboard-using-vim
- http://stackoverflow.com/questions/1497958/how-to-use-vim-registers
No comments:
Post a Comment