Re: Automatically edit file on startup without confirm dialogue?
- Thanks much to John, Ben, Nico,The 'silent' prefix was perfect--what I was looking for. It solved the problem for my inelegant, quick-and-dirty hack. I can switch to your suggested proper solutions later. (Witch sounds worth getting regardless.)
(Of course they are! For me, getting work done with a nonbroken, great tool takes precedence over getting the latest version--and probably having to recustomize it to work the way I want.)Amazing someone is still using Carbon Vim!Thanks!MarshallOn Aug 23, 2008, at 2:15 AM, Nico Weber wrote:Hi,On 23.08.2008, at 03:58, John Velman wrote:I'm kind of a novice at mac, but I think this would be easy withapplescript.Yes. Open Script Editor and puttell application "MacVim" to open "/Users/nico/src/snippets/todo.txt"into it. Save that as an application, and put it into your dock.Change the icon if you want. That's all you need to do (well, andadapt the path of the file) :-)HTH,NicoFrom: mail_ben_schmidt@...Subject: Re: Automatically edit file on startup without confirm dialogue?Date: August 23, 2008 12:06:59 AM CDTTo: vim_mac@...Reply-To: vim_mac@...Now I want to make my special second copy of vim (the one describedabove) automatically load my todo list whenever I start thisapplication. I tried sticking variations on "edit $HOME/todo" at theend of the vimrc or gvimrc in the application tree (/Application/VimTodo.app/Contents/Resources/vim). This works, but also producesan annoying "OK" dialogue listing the name of the file opened (twice)and the number of lines and characters in it.My question:Anybody know how to prevent the useless dialogue from showing up?I suppose:silent edit todo.txtshould do it. If it doesn't:silent! edit todo.txtalmost certainly will.Amazing someone is still using Carbon Vim! (I suppose this is whatyou're using.) Most people seem to now be using MacVimand a few Vim-cocoaI'd recommend MacVim. It does what most Mac apps do and only has asingle Dock icon for a number of windows (Vims). You'd have to solveyour to do list dock icon problem a different way, though. AppleScriptis one way. I find using Witch is good enough for me to easily find andget to my to do list which is also in VimBut you may find it's less trouble finding/getting to it with MacVimanyway.Smiles,Ben.I'm kind of a novice at mac, but I think this would be easy withapplescript. I had started something similar (bring up mutt in a speciallycolored terminal on login), but got sidetracked learning Cocoa. Lots morefun than Applescript. But I think what you want to do should be relativelyeasy.Best,John V.
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php