Friday, December 7, 2012

Re: calling a function on bufenter,bufnew,bufread

On 06:46 Fri 07 Dec , Chris Lott wrote:
> I have the following in my .vimrc -- but the call to the function
> isn't working. If I call the function manually after it opens, it
> works fine. The filename is set to vimperator.txt. Do I have to do
> something different to call a function in this way?
>
> function! WW()
> :set showtabline=0
> :set noshowmode
> :set laststatus=0
> :set noruler
> :set noshowcmd
> :call VimWriteRoom()
> endfunction
>
> nnoremap WW :call WW()<CR>
>
> au BufNewFile,BufEnter,BufRead vimperator.txt :call WW()<cr>
>
> c
> --
> Chris Lott <chris@chrislott.org>
>
> --
> 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

Hi,

Some time ago I used vimperator too, and I also had some additional
settings for it. As far as I recall vimperator has its own file type,
but I might be wrong. If it has you could use FileType autocommand
event.

Best,
Marcin

--
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: