Drag-and-drop saving with Vim
You need something like this in your ~/.vimrc file:
function! Save() let tmpname = tempname() let fname = expand('%') if fname == '' let fname = 'TextFile' endif silent exec 'write !savebox ' . fname . ' &gt; ' . tmpname let newname = system('cat ' . tmpname) let tmp = system('rm ' . tmpname) if tmpname != '' exec 'file ' . escape(newname, ' ') set nomodified endif endfunction command! Save call Save() map <F3> :Save<CR>
You'll need the savebox command from http://rox.sourceforge.net/snapshots/gui_utils.tgz.
Extract the archive and run './configure && make install' as root to install savebox.
Once you have the script saved to .vimrc or .gvimrc, you can then hit F3 to
get a savebox from which you may then drag and drop to a ROX-Filer window;
updating the text within this box will change the name under which it is saved.
»
- Printer-friendly version
- Login to post comments
Recent comments
2 years 8 weeks ago
2 years 17 weeks ago
3 years 1 week ago
3 years 5 weeks ago
3 years 9 weeks ago
3 years 10 weeks ago
3 years 10 weeks ago
3 years 14 weeks ago
3 years 14 weeks ago
3 years 15 weeks ago