> I tried man vim to figure it out but was unable to figure out what the
> man pages were saying and could find no reference to showing current
> line number while in insert mode and showing file name while in insert
> mode.
>
Using vim 6 yes?
The man page won't be of any help for this issue.
I'm not sure of a way to do this with vim 6. You can have them static (ie ...
not just in insert mode) easily :
<vimrc6>
set nu
set ls=2
if has('statusline')
let &stl="%f"
endif
</vimrc6>
Vim 7 is really new, and not rolled by default into distributions ... but if
you install it ... I think this will work for what you want :
<vimrc7>
function! s:EnterInsert()
set nu
set ls=2
if has('statusline')
let &stl="%f"
endif
endfunction
function! s:LeaveInsert()
set nonu
set ls!
endfunction
</vimrc7>
Possibly also need :
<more-vimrc7>
autocmd InsertLeave * call s:LeaveInsert()
autocmd InsertEnter * call s:EnterInsert()
</more-vimrc7>
But i see some people say that is not needed. Although I have not tested
this.
********
The issue is that the InsertEnter, InsertLeave events were not available in
vim6 ... so I do not see an easy way to do this ... You can't remap vim
commands (like 'i'), so how do you capture the insert mode switch? I do not
see a way.
give vim 7 a go.
Andy
_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying