Thursday, January 19, 2012

Re: setting global options from a modeline

On Tuesday, January 17, 2012 3:34:27 PM UTC, Ben Fritz wrote:
You could include a line like: 

local_vimrc: relative/path/to/config/file.vim 

in your TODO file, with a BufRead autocmd to find such a line 

Thanks, this does what I wanted!

I use a slightly simpler variant. In .vimrc I have
  autocmd BufRead TODO source ~/.vim/localvimrc.vim
and localvimrc.vim is
  if search('^:load_local_vimrc\s*$') > 0
    source .vimrc
  endif

This is the first vim script I wrote, so feel free to suggest improvements. :)

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: