Re: Vim php interface.

classic Classic list List threaded Threaded
80 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Ligesh

 Greetings.

 I would like to know if anyone has seen and/or interested in the vimphp interface effort by shin seung woo at sourceforge. the url is: http://sourceforge.net/projects/phpvim/

  I would like to know there are some plans for integrating this into the main vim source tree. I for one would love to have php interface, and I am really dying to write my own web browser with vim. I am currently using emacs-w3m as my web browser. Though the browser is good, but like all standard emacs stuff, it is damn too slow.  If there is php interface, I can write a browser, and finally do away with the clumsy emacs altogether.

  I have really come to like php-5 (php4 cannot be called as a language, but php5 is a different matter altogether), and I think php interface would be really cool.

  Thanks in advance.


--
:: Ligesh :: http://ligesh.com

 
Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Aaron Griffin
On 8/1/05, Ligesh <[hidden email]> wrote:
>   I would like to know there are some plans for integrating this into the main vim source tree. I for one would love to have php interface, and I am really dying to write my own web browser with vim. I am currently using emacs-w3m as my web browser. Though the browser is good, but like all standard emacs stuff, it is damn too slow.  If there is php interface, I can write a browser, and finally do away with the clumsy emacs altogether.

Umm, I believe you're misunderstanding two things:
1) vim is an editor, nothing more - integrating web browsing goes
against the principals of vim.  Also, why not just use w3m?
2) embedding php does not imply that vim can suddenly render HTML.
php works well for outputting raw HTML text, but doesn't do any actual
rendering... if you really want to write a console base browser, I
suggest you take a look at w3m's code
Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Ligesh


General Rant...

On the subject of vim being MERELY an editor:

I think it is time that we stop this charade. Vim is too good, and it can do EVERYTHING (I am an emacs expert actually) emacs can do, but does it around 10 times faster, and 100 times more consistent manner. Emacs is a motley collection of elisp code of varying standards. (Some good, many utterly inept), and a big mess. But I am 100% with Stallman's vision:

 IN unix, everything is a file. That means an editor (Whose primary function is to manage files) is the most powerful program, and can, in effect, mimic the behaviour of any and every software. In fact, one of the reasons I jumped ship to emacs was this incessant harangue by the vim folks about Vim being a mere editor. But after spending time with emacs, I realized that vim wasn't a mere editor. And I think it is time we position vim in that fashion, lest you turn off people like me. (People who always harbour grand visions about everything.;-)



On Mon, Aug 01, 2005 at 12:07:52PM -0500, Aaron Griffin wrote:
> On 8/1/05, Ligesh <[hidden email]> wrote:
> >   I would like to know there are some plans for integrating this into the main vim source tree. I for one would love to have php interface, and I am really dying to write my own web browser with vim. I am currently using emacs-w3m as my web browser. Though the browser is good, but like all standard emacs stuff, it is damn too slow.  If there is php interface, I can write a browser, and finally do away with the clumsy emacs altogether.
>
> Umm, I believe you're misunderstanding two things:
> 1) vim is an editor, nothing more - integrating web browsing goes
> against the principals of vim.  Also, why not just use w3m?

 Principles, shminciples. What does it matter? I need a good web browser. w3m doesn't allow you to reprogram the keys. I even contacted their mailing list, but no one was around actually. I need a very particular keymapping. I wrote the requisite elisp functions for emacs-w3m, and as I had already mentioned, it works alright. The only problem being the speed. Most likely I will be following the same method that emacs-w3m uses, and execute w3m as a external process, and display the output of w3m in vim. I will try to explain how I want the keys to work:

 When you press <Down> arrow, the the cursor should move till it reaches the line that contains a link on the right of the cursor. That means, it has to skip the lines that doesn't contain any links, but it shouldn't move left or right. It should come straight down, but stop on the line that contains a link.

 I really don't mind hacking the C code, (I have done it extensively for screen, and fvwm, but they are mature programs), but I have run into code synchronization nightmare with constantly evolving code, and w3m still has some way to go, if I am right.


> 2) embedding php does not imply that vim can suddenly render HTML.
> php works well for outputting raw HTML text, but doesn't do any actual
> rendering... if you really want to write a console base browser, I
> suggest you take a look at w3m's code

 I would mostly be using w3m to partially format the code, and render it in vim. And also I think it would be easier to have multiple sessions if use vim, rather than with w3m. I need to completely redo the software, and I am not being able to do so with w3m.  Currently I am using vim as my mailer (VIM calls mutt on each mailbox), as my media player. (Vimamp, written in vimscript), and I also wrote a ide kind of setup with vim. (idevim). And of course, I rewrote screen and integrated that with vim too. In screen, <M-d> writes the list of windows in a file and calls vim with that. In vim, you just go to a particular line and press <Enter> you can jump to that window. And I also added a emacs like iswitchb in vim, where vim will automatically filter off the lines that doesn't match the characters you type.

 So in zsh, you configure like this:

  mssh () {

          screen_set_title "ssh $@";
          ssh "$@";
  }

  Say you have logged into a machine with the name 'athena'. So the screen title for that particular window would be 'ssh athena'. Now in your screen press <M-d>, screen will open vim with the list of windows. Now just blindly type 'athena', and all the lines that doesn't match 'athena' will disappear, then just press <Enter>, and lo you are in that session.

  So to go to the screen window for the particular ssh you can type, without even thinking.

  <M-d>athena<Enter>

  And so on. You can configure all your important applications (VIM of course) to rename the screen title in this fashion, and thus managing a 90 window screen becomes very trivial.

  Anyway, what I mean is: To a creative mind, vim gives sort of infinite opportunities. And I want to rewrite all of the things I have done with vimscript (Which is a bit clumsy language compared to elisp) in php. I am seriously looking forward to a php interface. I can even contribute code, but currently I think the primary developer is not motivated enough, and the code is in a very inchoate state. So my main aim is to motivate the developer, and make it clear a lot of folks are waiting for him, and I was expecting some help from this list too.


  If you have reached here, I would like to thank for you for reading this extremely meandering mail, but I was trying to get my point across.

  Thanks.

--
:: Ligesh :: http://ligesh.com


 


Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Mikołaj Machowski
In reply to this post by Aaron Griffin
Dnia poniedzia?ek 01 sierpie? 2005 19:07, Aaron Griffin napisa?:
> On 8/1/05, Ligesh <[hidden email]> wrote:
> >   I would like to know there are some plans for integrating this into
> > the main vim source tree. I for one would love to have php interface,
> > and I am really dying to write my own web browser with vim. I am
> > currently using emacs-w3m as my web browser. Though the browser is
> > good, but like all standard emacs stuff, it is damn too slow.  If
> > there is php interface, I can write a browser, and finally do away
> > with the clumsy emacs altogether.

Disclaimer: I am not web developer, neither know PHP but I am doing some
pages from time to time.
>
> Umm, I believe you're misunderstanding two things:
> 1) vim is an editor, nothing more - integrating web browsing goes
> against the principals of vim.  Also, why not just use w3m?

Ligesh choose bad example but PHP interface would be great thing for web
developers. Instant check validity and output of some constructions,
SQL queries etc. In connection with coming intellisense-like features
promised by Bram + some scripting could create really nice ide features.

m.

Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

A.J.Mechelynck
In reply to this post by Ligesh
Most browsers can display large and small fonts, monospace or proportional,
on the same page, as well as images, etc. Vim can only display pure text,
using one single fixed-width font all over the page. Rather than reinventing
the wheel, have you tried Lynx < http://lynx.isc.org > ? That's a text-only
browser, where you can reassign key mappings to some extent.

Best regards,
Tony.

----- Original Message -----
From: "Ligesh" <[hidden email]>
To: "Aaron Griffin" <[hidden email]>
Cc: <[hidden email]>
Sent: Monday, August 01, 2005 9:03 PM
Subject: Re: Vim php interface.


>
>
> General Rant...
>
> On the subject of vim being MERELY an editor:
>
> I think it is time that we stop this charade. Vim is too good, and it can
> do EVERYTHING (I am an emacs expert actually) emacs can do, but does it
> around 10 times faster, and 100 times more consistent manner. Emacs is a
> motley collection of elisp code of varying standards. (Some good, many
> utterly inept), and a big mess. But I am 100% with Stallman's vision:
>
> IN unix, everything is a file. That means an editor (Whose primary
> function is to manage files) is the most powerful program, and can, in
> effect, mimic the behaviour of any and every software. In fact, one of the
> reasons I jumped ship to emacs was this incessant harangue by the vim
> folks about Vim being a mere editor. But after spending time with emacs, I
> realized that vim wasn't a mere editor. And I think it is time we position
> vim in that fashion, lest you turn off people like me. (People who always
> harbour grand visions about everything.;-)
>
>
>
> On Mon, Aug 01, 2005 at 12:07:52PM -0500, Aaron Griffin wrote:
>> On 8/1/05, Ligesh <[hidden email]> wrote:
>> >   I would like to know there are some plans for integrating this into
>> > the main vim source tree. I for one would love to have php interface,
>> > and I am really dying to write my own web browser with vim. I am
>> > currently using emacs-w3m as my web browser. Though the browser is
>> > good, but like all standard emacs stuff, it is damn too slow.  If there
>> > is php interface, I can write a browser, and finally do away with the
>> > clumsy emacs altogether.
>>
>> Umm, I believe you're misunderstanding two things:
>> 1) vim is an editor, nothing more - integrating web browsing goes
>> against the principals of vim.  Also, why not just use w3m?
>
> Principles, shminciples. What does it matter? I need a good web browser.
> w3m doesn't allow you to reprogram the keys. I even contacted their
> mailing list, but no one was around actually. I need a very particular
> keymapping. I wrote the requisite elisp functions for emacs-w3m, and as I
> had already mentioned, it works alright. The only problem being the speed.
> Most likely I will be following the same method that emacs-w3m uses, and
> execute w3m as a external process, and display the output of w3m in vim. I
> will try to explain how I want the keys to work:
>
> When you press <Down> arrow, the the cursor should move till it reaches
> the line that contains a link on the right of the cursor. That means, it
> has to skip the lines that doesn't contain any links, but it shouldn't
> move left or right. It should come straight down, but stop on the line
> that contains a link.
>
> I really don't mind hacking the C code, (I have done it extensively for
> screen, and fvwm, but they are mature programs), but I have run into code
> synchronization nightmare with constantly evolving code, and w3m still has
> some way to go, if I am right.
>
>
>> 2) embedding php does not imply that vim can suddenly render HTML.
>> php works well for outputting raw HTML text, but doesn't do any actual
>> rendering... if you really want to write a console base browser, I
>> suggest you take a look at w3m's code
>
> I would mostly be using w3m to partially format the code, and render it in
> vim. And also I think it would be easier to have multiple sessions if use
> vim, rather than with w3m. I need to completely redo the software, and I
> am not being able to do so with w3m.  Currently I am using vim as my
> mailer (VIM calls mutt on each mailbox), as my media player. (Vimamp,
> written in vimscript), and I also wrote a ide kind of setup with vim.
> (idevim). And of course, I rewrote screen and integrated that with vim
> too. In screen, <M-d> writes the list of windows in a file and calls vim
> with that. In vim, you just go to a particular line and press <Enter> you
> can jump to that window. And I also added a emacs like iswitchb in vim,
> where vim will automatically filter off the lines that doesn't match the
> characters you type.
>
> So in zsh, you configure like this:
>
>  mssh () {
>
>   screen_set_title "ssh $@";
>   ssh "$@";
>  }
>
>  Say you have logged into a machine with the name 'athena'. So the screen
> title for that particular window would be 'ssh athena'. Now in your screen
> press <M-d>, screen will open vim with the list of windows. Now just
> blindly type 'athena', and all the lines that doesn't match 'athena' will
> disappear, then just press <Enter>, and lo you are in that session.
>
>  So to go to the screen window for the particular ssh you can type,
> without even thinking.
>
>  <M-d>athena<Enter>
>
>  And so on. You can configure all your important applications (VIM of
> course) to rename the screen title in this fashion, and thus managing a 90
> window screen becomes very trivial.
>
>  Anyway, what I mean is: To a creative mind, vim gives sort of infinite
> opportunities. And I want to rewrite all of the things I have done with
> vimscript (Which is a bit clumsy language compared to elisp) in php. I am
> seriously looking forward to a php interface. I can even contribute code,
> but currently I think the primary developer is not motivated enough, and
> the code is in a very inchoate state. So my main aim is to motivate the
> developer, and make it clear a lot of folks are waiting for him, and I was
> expecting some help from this list too.
>
>
>  If you have reached here, I would like to thank for you for reading this
> extremely meandering mail, but I was trying to get my point across.
>
>  Thanks.
>
> --
> :: Ligesh :: http://ligesh.com
>
>
>
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Ligesh
On Mon, Aug 01, 2005 at 09:11:39PM +0200, Tony Mechelynck wrote:
> Most browsers can display large and small fonts, monospace or proportional,
> on the same page, as well as images, etc. Vim can only display pure text,
> using one single fixed-width font all over the page. Rather than
> reinventing the wheel, have you tried Lynx < http://lynx.isc.org > ? That's
> a text-only browser, where you can reassign key mappings to some extent.
>

 lynx doesn't have 2 dimensional rendering. And is not very configurable. I have done quite a lot using their exec option, but still isn't exactly what I am looking for. But worse, lynx will not even properly render many of the standard html.

 Why do you need monspace/proportional etc to render a web page. What lynx can do, vim can do better. And anyway, as I said, I am planning to use w3m to partially parse the code. W3m has an option where it will spit out semi-digested html, which you can easily parse and render on your own, which is what emacs-w3m uses. And emacs-w3m is the best browser around (at least as far as I am concerned.). So I just need to mimic its behaviour. I can even try this with vimscript, but I think it is not a very recommended method. As Bram himself once said so.

 I am very happy with emacs-w3m except for the speed, and the fact that I don't want to do with emacs anymore. If I get some new idea, I will have to first refresh all my emacs skills first before I can implement it. I just need a consistent platform. And please understand that I have tried quite a lot of stuff. I have configured in detail all the 3 text browsers (lynx,links,w3m, I tried netrik with a lot of anticipation, but it turned out to be vaporware, at least last I checked.), but each had some small quirk which I did not like.

--
:: Ligesh :: http://ligesh.com


Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Aaron Griffin
In reply to this post by Mikołaj Machowski
On 8/1/05, Mikolaj Machowski <[hidden email]> wrote:

> Disclaimer: I am not web developer, neither know PHP but I am doing some
> pages from time to time.
> >
> > Umm, I believe you're misunderstanding two things:
> > 1) vim is an editor, nothing more - integrating web browsing goes
> > against the principals of vim.  Also, why not just use w3m?
>
> Ligesh choose bad example but PHP interface would be great thing for web
> developers. Instant check validity and output of some constructions,
> SQL queries etc. In connection with coming intellisense-like features
> promised by Bram + some scripting could create really nice ide features.

That stuff can be done without php being integrated into vim.  That
said, I do think it would be nice to have php integrated.  I am
personally a python fan, but know many people who script in php.

The thing is though, where does this stop - how many interpreters need
to be embedded into vim to satisfy everyone?
Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Mikołaj Machowski
In reply to this post by Ligesh
Dnia poniedzia?ek 01 sierpie? 2005 21:55, Ligesh napisa?:
> tried quite a lot of stuff. I have configured in detail all the 3 text
> browsers (lynx,links,w3m, I tried netrik with a lot of anticipation, but

Did you try elinks?

m.

Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Ligesh
In reply to this post by Aaron Griffin
On Mon, Aug 01, 2005 at 03:33:33PM -0500, Aaron Griffin wrote:

> On 8/1/05, Mikolaj Machowski <[hidden email]> wrote:
> > Disclaimer: I am not web developer, neither know PHP but I am doing some
> > pages from time to time.
> > >
> > > Umm, I believe you're misunderstanding two things:
> > > 1) vim is an editor, nothing more - integrating web browsing goes
> > > against the principals of vim.  Also, why not just use w3m?
> >
> > Ligesh choose bad example but PHP interface would be great thing for web
> > developers. Instant check validity and output of some constructions,
> > SQL queries etc. In connection with coming intellisense-like features
> > promised by Bram + some scripting could create really nice ide features.
>
> That stuff can be done without php being integrated into vim.  That
> said, I do think it would be nice to have php integrated.  I am
> personally a python fan, but know many people who script in php.
>
> The thing is though, where does this stop - how many interpreters need
> to be embedded into vim to satisfy everyone?

 For one, it is a compile time option, and it harms absolutely no one. Second, even codewise, the source will be restricted to a single file, since once you have support for one language, adding support for another should involve absolutely zero changes to main code tree. So as such it is like having drivers for varied devices. It doesn't hurt to have many since they are just extension.

 But more importantly, languages are very personal thing, and you really cannot become uber expert in more than one language, since languages effect the way you think, switching continuously between two languages is very counter productive. So if possible, we need support as many GOOD programming language there is.

 The more languages you have, the more we will have people writing scripts, and extending vim, and having a lot of fun. I really cannot find a single drawback to adding one more language support to vim. And php5 is seriously on to becoming a formidable system out there, with a quite a lot of people going to use it. As I had said earlier php4 is NOT a software language (It shouldn't be called one), but php5 is currently the best one there. (The only problem is the kludgy function naming methodology, but with vim highlighting the php functions, even that is a good point, since you can trivially distinguish language functions from your own, and you will never really run into naming problems actually).

 I think php interface is going to be great. The programmer base is really huge (A lot of them newbies, but still), and with php5, we will have some good programmers too.

 And the thing is, one person has already started the work. I think it got stalled because of lack of motivation. (I am just guessing, since his initial mails exuded quite a lot of energy and enthuiasm). So we just need to give it some formal backing... by incorporating it into the main vim tree, if possible.

 Thanks.

--
:: Ligesh :: http://ligesh.com 

 
Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Aaron Griffin
In reply to this post by Ligesh
Ok, I'm not a fan of these silly arguements like this, but I'm most
likely going to start one anyway.

On 8/1/05, Ligesh <[hidden email]> wrote:
> On the subject of vim being MERELY an editor:
>
> I think it is time that we stop this charade. Vim is too good, and it can do EVERYTHING (I am an emacs expert actually) emacs can do, but does it around 10 times faster, and 100 times more consistent manner. Emacs is a motley collection of elisp code of varying standards. (Some good, many utterly inept), and a big mess. But I am 100% with Stallman's vision:
>
>  IN unix, everything is a file. That means an editor (Whose primary function is to manage files) is the most powerful program, and can, in effect, mimic the behaviour of any and every software. In fact, one of the reasons I jumped ship to emacs was this incessant harangue by the vim folks about Vim being a mere editor. But after spending time with emacs, I realized that vim wasn't a mere editor. And I think it is time we position vim in that fashion, lest you turn off people like me. (People who always harbour grand visions about everything.;-)

There are differing views here.  Emacs is *made* to do everything -
check your mail, browse the web, wash the dog, etc.  While that works
well for some, it goes against the unix philosphy of "do one thing and
do it well".  Why not combine rm, mv, cp, cd, and ls into one big app?
Because that goes against the unix philosophy - ls does one thing
(lists files) and it does it well, and simply.  Adding more features
to something is what is called "feature creep".

vim itself is an editor.  it edits text, nothing more.  sure, if you
stick with the whole "everything is a file" concept, that makes vim
powerful, but that wasn't the original topic.  the topic was about
viewing web pages in vim.  can you view web pages in MS Word
(afterthough: I think you might be able to, actually, but we can all
agree word is a tad bloated anyway)? What about Scite? gedit? kate? I
challenge you to find one text editor (besides emacs) which has this
feature.

Now, if you want to view the HTML for editing purposes, that's great,
and it can be done with the netrw plugin.  The problem is, you're
talking about rendering HTML.  Now we get into feature creep.
Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Ligesh
On Mon, Aug 01, 2005 at 04:06:53PM -0500, Aaron Griffin wrote:

> Ok, I'm not a fan of these silly arguements like this, but I'm most
> likely going to start one anyway.
>
> On 8/1/05, Ligesh <[hidden email]> wrote:
> > On the subject of vim being MERELY an editor:
> >
>
> vim itself is an editor.  it edits text, nothing more.  sure, if you
> stick with the whole "everything is a file" concept, that makes vim
> powerful, but that wasn't the original topic.  the topic was about
> viewing web pages in vim.  can you view web pages in MS Word
> (afterthough: I think you might be able to, actually, but we can all
> agree word is a tad bloated anyway)? What about Scite? gedit? kate? I
> challenge you to find one text editor (besides emacs) which has this
> feature.
>
> Now, if you want to view the HTML for editing purposes, that's great,
> and it can be done with the netrw plugin.  The problem is, you're
> talking about rendering HTML.  Now we get into feature creep.

 Emacs has absolutely nothing special to make it into anything. It just provides basic file editing capabilities, and a very good language (elisp), other than that, as I have said earlier, emacs really doesn't provide anything. (except that It allows you to set full property for a specific region of text, but I think this can be emulated using hidden markers in vim). In other words, every good editor can be converted to a web browser, or whatever you want it to be, and it is no big deal actually.

 As for integrating 'rm', 'ls' into one big program, that is unnecessary. On the other hand, if someone tells me that a program shouldn't have the 'recurse' option, and instead you should first get a list of files using 'find', I will say he is insane.  Both integration, and distribution has their advantages, and we need a healthy mix of both.  There currently does exist a browser based on vim. It is written in perl but. I did try it, but there was version mismatch issue, and since I am no perl expert, I did not pursue it further. Anyway I realized, it would be easier to follow the emacs-w3m way, and use w3m as the external program to semi-render the html first.

 But all this is irrelevant. I am not requesting for the web browser to be part of the default vim distribution, but rather that I want to write a web browser for myself using vim. I think there is a huge difference between the two statements.
 
  Anyway, we should logically analyze each situation rather than blindly tout 'principles'. Finally the point of Vim is to make people happy, and we should always keep that in mind. :-).
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Aaron Griffin
On 8/1/05, Ligesh <[hidden email]> wrote:
> On Mon, Aug 01, 2005 at 04:06:53PM -0500, Aaron Griffin wrote:
> > Ok, I'm not a fan of these silly arguements like this, but I'm most
> > likely going to start one anyway.
..... insert flame war here ....
>   Anyway, we should logically analyze each situation rather than blindly tout 'principles'. Finally the point of Vim is to make people happy, and we should always keep that in mind. :-).

I knew this would happen... no matter how much you try to emotively
detach yourself from a situation someone always throws some snappy
line about someone blindly touting something-or-other...

So, I apologize - you're right... a web browser in vim is a good
idea... please continue. I didn't mean to impede.  I was only trying
to make things easy on you.... it is my opinion that a integrating a
web browser with a text editor is a poor idea because it breaks the
"do one thing and do it well" philosophy.
You're obviously of a different opinion, so please, carry on and
ignore my "blind principles"
Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Ligesh
In reply to this post by Mikołaj Machowski
On Mon, Aug 01, 2005 at 08:56:24PM +0200, Mikolaj Machowski wrote:
> Ligesh choose bad example but PHP interface would be great thing for web
> developers. Instant check validity and output of some constructions,
> SQL queries etc. In connection with coming intellisense-like features
> promised by Bram + some scripting could create really nice ide features.
>

 Yeah, I think I should make it very clear. I am not requesting for vim to behave like a browser in the default install, or that we should have browser features built into the main source code, but that:

 _I_ want to write a browser for _myself_ using vim. If others use it, well and good, but even that is not very important. I now think I shouldn't have brought the whole browser thingy into this.

 My real intention was to bring to list members notice the phpvim project at the sourceforge, which seems to have stalled at this point. I would just like to have that project integrated into the main vim source tree, and thus give it a much needed boost.

 I hope I haven't strayed too much.

 And of course, I think we should find a tagline for vim which is better than the current one (Mere Editor).

 Thanks.

--
:: Ligesh :: http://ligesh.com 


Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Ligesh
In reply to this post by Aaron Griffin
On Mon, Aug 01, 2005 at 04:40:48PM -0500, Aaron Griffin wrote:

> I knew this would happen... no matter how much you try to emotively
> detach yourself from a situation someone always throws some snappy
> line about someone blindly touting something-or-other...
>
> So, I apologize - you're right... a web browser in vim is a good
> idea... please continue. I didn't mean to impede.  I was only trying
> to make things easy on you.... it is my opinion that a integrating a
> web browser with a text editor is a poor idea because it breaks the
> "do one thing and do it well" philosophy.
> You're obviously of a different opinion, so please, carry on and
> ignore my "blind principles"

 Actually there was a misunderstanding. I have already explained this. I just want to write a web browser for _myself_. I have tried every single web browser available and I am really fed up. Now I want to try vim.

  I just broached the subject of a browser because I think vim is clearly capable of being a browser, and I am still confused why the vim people seem to be ashamed to admit that. Really strange. Vim is now a very great software that is PRETENDING to be a simple text editor. And the developers steadfastly refuse to acknowledge that it is really powerful. Weird.

 
--
:: Ligesh :: http://ligesh.com 

 
Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

François Pinard
In reply to this post by Aaron Griffin
[Aaron Griffin]

> On 8/1/05, Ligesh <[hidden email]> wrote:

> > On the subject of vim being MERELY an editor:  I think it is time
> > that we stop this charade. Vim is too good, and it can do EVERYTHING

> There are differing views here.  Emacs is *made* to do everything
> [...] it goes against the unix philosphy of "do one thing and do it
> well".

I'm always striving for the feeling of freedom.  One might be quite
happy with an editor as Emacs, but I got to use for each and every
aspect of my work (organising email, doing statistical studies, handling
my own schedule, etc.) to point I became overly dependent on it, and
somehow disconnected from the rich diversity in the free software field.
Breaking the link with Emacs had been a painful adventure, as there were
so many aspects of it for which I needed simultaneous replacement.

Now, I enjoy a much more modular set of tools, with Vim currently
dedicated to editing tasks.  I learned to much like Vim many virtues,
and would undoubtedly be sad if I had no choice but give up on using it.
Yet, choosing another editor would be much less painful, and this is
comforting.  It is even thinkable with Vim that I try another editor for
a few weeks, for fun, without my computer world falling apart! :-)

> The problem is, you're talking about rendering HTML.  Now we get into
> feature creep.

In these days, I see myself suggesting various tricks and recipes! :-)
Take it as an illustration that many other avenues are possible, not
at all that my own ways are the necessary way to go.  Of course...

I use `openbox' for a window manager.  Simple, fast, effective,
unobtrusive, sober, but configurable, that's perfect for me.  In my
case, the Ctrl-Alt-Digit commands switch between ten desktops (and I
even have strong habits about the purpose of each).  Ctrl-Alt-7, in
particular, brings me to Mozilla.  I configured Ctrl-Alt-Letter keys so
they all call the single Python script `openbox-helper', yet forwarding
each letter as an option `-Letter'.  So, I got 26 user commands to the
window manager, easily callable with keys, that I may program in Python.
Many of these commands use `xselection' (the tool) for recovering the
primary selection, or use `xprompt' to get supplementary arguments.

So, whenever I see an URL in a message, in Vim, or anywhere, which
I want to see, I merely use the mouse for selecting that URL
(double-clicking is often sufficient to get it without any dragging),
then do either Ctrl-Alt-l (a small L) for launching `links -g' on it, or
Ctrl-Alt-o (usually followed with Ctrl-Alt-7) for triggering the already
running Mozilla to open a new Tab for this URL.  I use `links -g' for
quick, yet simpler rendering in the current desktop, or Mozilla for more
complex things.  For both these commands, if I mouse select a file name
instead of an URL, my openbox-helper script builds a "file:/..." with
the file name made absolute, so the mechanics work equally good for
browsing local HTML, all rendered.  (I have some trickery for knowing
which is the current directory, to interpret relative file names).

With a bit of imagination, and combining a few common tools, one can
give oneself fairly effective and speedy environments.  Many things
could be done before it becomes necessary to bloat Vim.


P.S. - Ctrl-Alt-v launches Vim on the mouse-selected file name. :-)

--
Fran?ois Pinard   http://pinard.progiciels-bpi.ca
Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

A.J.Mechelynck
In reply to this post by Ligesh
----- Original Message -----
From: "Ligesh" <[hidden email]>
To: "Aaron Griffin" <[hidden email]>
Cc: <[hidden email]>
Sent: Tuesday, August 02, 2005 12:12 AM
Subject: Re: Vim php interface.
[...]

>  I just broached the subject of a browser because I think vim is clearly
> capable of being a browser, and I am still confused why the vim people
> seem to be ashamed to admit that. Really strange. Vim is now a very great
> software that is PRETENDING to be a simple text editor. And the developers
> steadfastly refuse to acknowledge that it is really powerful. Weird.

Vim can edit files. It can also do some related tasks like syntax colouring
or directory browsing. It was never meant to do _everything_. In particular:

    - Vim cannot run a shell interactively in a Vim window (but it can run a
batch process in a shell and display the results afterwards).

    - Vim cannot display proportional text, or pictures.

    - Vim doesn't include a kitchen sink but you can clean yours with it.
For that, however, you need the Unilever version, not Bram Moolenaar's
version.

If you want to write a script to display rendered HTML in Vim, no problem,
go ahead. You may find Vince Negri's 'conceal' patch useful but I don't know
if there exists a version of it which is compatible with the current
versions of Vim. IIUC, it lives at vim-online as
http://vim.sourceforge.net/scripts/script.php?script_id=302 .

Best regards,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

François Pinard
In reply to this post by Ligesh
[Ligesh]

> I think vim is clearly capable of being a browser,

As long as you do not expect font changes, embedded pictures, Javascript
 Java. :-)

--
Fran?ois Pinard   http://pinard.progiciels-bpi.ca
Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Ligesh
In reply to this post by Mikołaj Machowski
On Mon, Aug 01, 2005 at 10:34:18PM +0200, Mikolaj Machowski wrote:
> Dnia poniedzia?ek 01 sierpie? 2005 21:55, Ligesh napisa?:
> > tried quite a lot of stuff. I have configured in detail all the 3 text
> > browsers (lynx,links,w3m, I tried netrik with a lot of anticipation, but
>
> Did you try elinks?

 I meant elinks, rather than links, since that is the one that is configurable. But it faces the same problem as links. Though its rendering is 2d, the key motion is one dimentional. This is pretty much irritating, and makes it worse than lynx. (In lynx, both rendering AND key motion are single dimensional).  For instance, if you want to go to a link just on the right of your current link you have to first traverse all the way down, and only then you can get to the right. And also when the cursor reaches the text area it automatically gets into input mode. (i like the w3m way where you have to first press enter after reaching the input box, and the input is entered through a prompt at the bottom) Anyway, I have very peculiar requirements, and I think my best bet is to turn vim into one.

 There are other advantages too. In emacs, I have integrated a dictionary with the browser. So, in your browser, you just put the cursor on a word and press <M-w> it will take you to the definition of the word. Google search is directly built into the browser. It is nice to directly cut and paste the web pages from the browser into file - for instance, source code snippets. Currently I have to use a mouse, and the text gets all garbled.

 Having your editor as your browser has too many advantages as far as I am concerned, and considering that I am already a vim expert, there are a trillion improvements I can make to my current browsing experience.

 But as I said, I was just stating my personal preferences, and not demanding that vim behave like a browser in its default setup. I just love to have everything tightly integrated, and I have done quite a bit of work towards that.

 thanks.

--
:: Ligesh :: http://ligesh.com 


Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Ligesh
In reply to this post by A.J.Mechelynck
On Tue, Aug 02, 2005 at 12:24:58AM +0200, Tony Mechelynck wrote:

> ----- Original Message -----
> From: "Ligesh" <[hidden email]>
> > I just broached the subject of a browser because I think vim is clearly
> >capable of being a browser, and I am still confused why the vim people
> >seem to be ashamed to admit that. Really strange. Vim is now a very great
> >software that is PRETENDING to be a simple text editor. And the developers
> >steadfastly refuse to acknowledge that it is really powerful. Weird.
>
> Vim can edit files. It can also do some related tasks like syntax colouring
> or directory browsing. It was never meant to do _everything_. In particular:
>
>    - Vim cannot run a shell interactively in a Vim window (but it can run a
> batch process in a shell and display the results afterwards).
>
>    - Vim cannot display proportional text, or pictures.

 Neither of the features are needed to render html. I might need some method to mark regions in the text, but other than that, you can turn vim into a browser even now using vimscript.

Reply | Threaded
Open this post in threaded view
|

Re: Vim php interface.

Ligesh
In reply to this post by Ligesh
On Tue, Aug 02, 2005 at 04:11:19AM +0530, Ligesh wrote:
> On Mon, Aug 01, 2005 at 10:34:18PM +0200, Mikolaj Machowski wrote:
> > Dnia poniedzia?ek 01 sierpie? 2005 21:55, Ligesh napisa?:
> > > tried quite a lot of stuff. I have configured in detail all the 3 text
> > > browsers (lynx,links,w3m, I tried netrik with a lot of anticipation, but
> >
> > Did you try elinks?
>
>  I meant elinks, rather than links, since that is the one that is configurable. But it faces the same problem as links. Though its rendering is 2d, the key motion is one dimentional. This is pretty much irritating, and makes it worse than lynx. (In lynx, both rendering AND key motion are single dimensional).  For instance, if you want to go to a link just on the right of your current link you have to first traverse all the way down, and only then you can get to the right. And also when the cursor reaches the text area it automatically gets into input mode. (i like the w3m way where you have to first press enter after reaching the input box, and the input is entered through a prompt at the bottom) Anyway, I have very peculiar requirements, and I think my best bet is to turn vim into one.

 I just checked the latest elinks, and they have solved a lot a problems. They have added 2d keymotion, and also not getting automatically getting into input mode feature. But they do not have <C-w> delete word and so on. Anyway, I will always need some feature which I will have to write myself, and I would prefer to have a browser I can rewrite the code of.



 thanks.

--
:: Ligesh :: http://ligesh.com 


1234