On Fri, May 08, 2009 at 09:19:40AM -0700, Ben Fritz wrote: > > On May 8, 7:13 am, Dennis Benzinger <[email protected]> wrote: > > (this is regarding creating an IRC plugin IIUC) > > > > > If you don't insist on having everything in on buffer I'd use a > > horizontally split window. The upper window can be readonly and display > > the conversation and the lower window would be the input window. Then > > you can use all powerful abilities Vim has to offer to edit your input > > and to send your input you can setup a mapping. > > > > My suggestion would be to create an Ex command to send the messages. > For the sake of demonstration, call it IRCSend (you can use whatever > name you want). > > Your plugin would create a scratch buffer (with buftype=nofile), with > nomodifiable set. > > You would not be able to modify this buffer at all, only through > IRCSend and any other commands you create. Your plugin could map : or > <CR> or any other key you like to open a command line with IRCSend pre- > populated. > > For most sends, all the user would want to do is enter text and hit > enter. If they want greater editing abilities, they can just use the > command-line window. See :help cmdwin.
Do you mean that the Ex command work like this: set the buf modifiable, send the command, then set buf to unmodifiable again? But in Ex command mode, most abilities in insert mode are lost, such as many types of completions, I can define new completion func for Ex, but that need some maybe more complicated work. And I also prefer my original question's effect, maybe two window, one for channel buf, another for commandline input, can do it, but I don't like the seperater of window, too width, and the statusbar shows unuseful infos by default, I need more work to trick the status format. -- Hi, Wu, Yue --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
