open_file_from_clip_board : open file path that is copied in clipboard
script karma |
Rating -1/3,
Downloaded by 1026 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Vinh Tran |
|
script type |
utility |
|
description |
Note this script need clipboard supported
http://vim.wikia.com/wiki/Accessing_the_system_clipboard
specifically, it use the * register to get the text in the clipboard
this little script define a function call OpenFilesFromClipboard()
If you, for example, execute some command from the terminal (maybe a grep) and get result like this:
/Users/me/myfile:23:something something
/Users/me/anotherfile: 34 I am a file
/Users/me/yetanotherone hello
what you can do with this plugin is: highlight the text and copy it into your system clipboard (Cmd-c in MacOSX and Ctrl-c in Windows)
Assuming you have a mapping in your .vimrc
map <LEADER>jc :call OpenFilesFromClipboard()<CR>
then open your vim and type <LEADER>jc will open that each file into a new tab
I hard code to tabnew for now, check back later version for more flexibility
Note:
just reallize that support different program on different environment is impossible. If it works for you, great, otherwise, please read the code, the idea and code it up for your usage |
|
install details |
copy the .vim file to your vim space/plugin
map a key to function OpenFilesFromClipboard() e.g:
map jcb :call OpenFilesFromClipboard()
enjoy!! |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.218.102.138
|