Visible Spaces
Hi All - Sorry if this obvious but I couldn't find anything in :help or google. Is there a vim option to represent space characters in a file as a dot or something else not blank? Thanks, Stewart
Re: Motions in visual(line|block)
I didn't know either, but from my testing it seems to do something like: move to the start of the current scope and format (indent) everything in the current scope. at least that's what it seems to do for me. ;-) On 7/14/06, Scott LaBounty [EMAIL PROTECTED] wrote: Max, OK, I'll bite. What does =a{ do? The = is a format, and the { moves to the start of a class (at least that's what is does in the ruby file I tested this on). So, what's the a do in this command? Lord knows, anything that annoys my Visual Studio colleagues is all right with me. Scott LaBounty Nexa Technologies, Inc. Max Dyckhoff wrote: I've noticed that using some motions - specifically i{ and suchlike - will cancel a visual line/block and turn it into regular visual mode instead, which is rather annoying. Is this intentional, or a bug? I should just mention that my new favourite command is =a{, which makes me smile every time I use it, and which really annoys my Visual Studio using colleagues. Chairs! -- Max Dyckhoff AI Engineer Bungie Studios
Network access from vim
Hey all -- I looked through the vim FAQ/help but wasn't able to find any information about network access from within vim, so I thought I'd ask about it here. I want to initiate commands from within vim to access a specific server for information -- a TCP/IP connection, probably a HTTP query on top of that. Is this possible from within vim, or do I need to use the system function to call some helper app on the host operating system? If I have to use a helper app, what's the best way to detect and act on the operating system environment. Thanks, Stewart
Re: Network access from vim
Thanks Tony. I looked at that, but it doesn't support generic TCP sockets, nor does it support HTTP writing. I need to be able send and receive information with a remote service, and netrw only does half the job. Does the client-server stuff in vim use TCP sockets? Is that API available to scripts? Thanks, Stewart On 6/22/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: Stewart Johnson wrote: Hey all -- I looked through the vim FAQ/help but wasn't able to find any information about network access from within vim, so I thought I'd ask about it here. I want to initiate commands from within vim to access a specific server for information -- a TCP/IP connection, probably a HTTP query on top of that. Is this possible from within vim, or do I need to use the system function to call some helper app on the host operating system? If I have to use a helper app, what's the best way to detect and act on the operating system environment. Thanks, Stewart From within Vim, use :help pi_netrw.txt HTH, Tony.
Re: Network access from vim
On 6/22/06, Marc Weber [EMAIL PROTECTED] wrote: Upon closer inspection, netrw delegates network activity to wget/fetch/rsync and friends anyway, so I guess I'll do the same. It's given me some direction on how to handle different operatings systems -- 'if has(win32)' etc. It's not a robust solution, but we work within our confines, right? :-) I didn't get exactly what you are trying to do .. but you have the option to use python, ruby from python you can call any C function.. So it should no problem to create a TCP connection.. ;-) Wait, what? I can access python and ruby from within a vim script? What I'm trying to do is to write a vim script that will take some information from the current open buffer, send it to a web service, receive information back from the webservice, and display it in the vim buffer (and another buffer). Everything I need is available in vim scripting, apart from being able make HTTP POSTs to webservices. It looks like I can't make an arbitrary TCP connection from within vim (please correct me if I'm wrong!) so I'll need to use the system() function in my vim script to do that (like netrw does). And since I want it to be cross-platform, I'll need to do a bunch of operating system snooping to figure out what I can use to make the network access. Stewart
Re: Network access from vim
On 6/22/06, Tom Purl [EMAIL PROTECTED] wrote: On 6/22/06, Marc Weber [EMAIL PROTECTED] wrote: Upon closer inspection, netrw delegates network activity to wget/fetch/rsync and friends anyway, so I guess I'll do the same. It's given me some direction on how to handle different operatings systems -- 'if has(win32)' etc. It's not a robust solution, but we work within our confines, right? :-) I didn't get exactly what you are trying to do .. but you have the option to use python, ruby from python you can call any C function.. So it should no problem to create a TCP connection.. ;-) Wait, what? I can access python and ruby from within a vim script? Here's another resource for you that may be helpful: * http://not.upbylunch.com/2006/05/16/wordpress-posting-vim-script/ This person wrote an script in python that does some rpc stuff (using the MetaWebLog API) and it can be invoked from within Vim. This should help you get started if you want to create something for yourself. Hope that helps! Tom Purl Thanks for the info guys, that's very helpful. I've never used a version of vim with python/perl/ruby compiled into it, so that's a whole new world for me. Thanks!