On Tue, Jan 13, 2009 at 18:51, Itai Fiat <itai.f...@gmail.com> wrote:
> On Tue, Jan 13, 2009 at 17:22, Per Thulin > <per.thu...@valentinewebsystems.se> wrote: >> >> 1. From vim, run :shell >> 2. Find the files I'm after >> 3. Open these in the vim session I ran :shell from. > > This sound incredibly useful. This idea has never occurred to me, but it is > really good, and I will use it. Below you will find my take on how to achieve > this. There is probably much room for improvement. Improvement the first: Bash file (~/bin/choose) ------------------------ #!/bin/bash for filename in $* do echo `readlink -f $filename` >> ~/.vim/chosen_files done .vimrc ------ function s:ShellChoose () call system("rm -f ~/.vim/chosen_files") shell if !filereadable(expand("~/.vim/chosen_files")) return endif let l:files=system("cat ~/.vim/chosen_files") let l:files=substitute(l:files, "\n", " ", "g") exec "argadd ".files endfunction command -nargs=0 -bang Shell call s:ShellChoose() --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---