George | 1 Jan 2005 13:08
Picon
Favicon

Open file in Firefox

I know this isn't exactly on topic, but I'm hoping someone here already
has solution as to how to accomplish this.  You'd think finding a list
of what command-line options are available would be a simple thing... 

The closest I've come is repeated references to the followng:

 mozilla -a firefox -remote 'openURL(%s,new-tab)'

which is supposed to be Linux-specific.  Either way, it doesn't work.
And executing something like 

   firefox index.html

directly on the command-line forces a delay while Firefox does its best
to try and resolve www.index.html.

To try and make this message a bit more on-topic, I did stumble across a
page which purports to explain how to implement vim-like keybindings in
Firefox. The address is http://www.calmar.ws/firefox/index.php for
anyone interested in giving it a shot.  I'm too busy with pressing my F5
key for the moment.

Oh, and Happy New Year! to everyone.

--

-- 
George

Alan G Isaac | 1 Jan 2005 16:04
Picon
Favicon

Re: Open file in Firefox

To view current file in firefox:
inoremap <vb <esc>:up<cr>:!start c:\programs\firefox\firefox.exe file:///%:p:gs?\\?/?<cr>

hth,
Alan Isaac

Sebastian Menge | 2 Jan 2005 01:32
Picon
Picon

vim reference card

Hi all!

I have just compiled a VIM reference card for my own purposes. If anyone
is interested, download it here:

http://ls10-www.cs.uni-dortmund.de/~menge/vimquick.pdf

I wondered that I didnt find any good (compact and rather complete)
reference on the net. The only one I found was sorted by "command", not
by functionality which is rather useless in my opinion. 

I re-sorted it and hope there arent too many bugs in it.

Please send comments, corrections and suggestions!

Happy New Year,

--

-- 
Sebastian Menge <sebastian.menge <at> uni-dortmund.de>

Neil Zanella | 2 Jan 2005 03:33
Picon

gvim problems: auto indent on windows

Hello,

I just downloaded the gvim.exe 6.3 from the vim site. I am editing an HTML
file and I keep getting unwanted automatic indentation. How do I turn this
off? It keeps doing the wrong thing (or at least not what I want).

Thanks,

Neil

Sebastian Menge | 2 Jan 2005 19:05
Picon
Picon

Re: vim reference card

> Suggestion: you don't visually distinguish between literal characters 
fixed.

> Also, make the TeX source available.
> > http://ls10-www.cs.uni-dortmund.de/~menge/vimquick.pdf
and http://ls10-www.cs.uni-dortmund.de/~menge/vimquick.tex

I really should mention and thank Laurent Gregoire whos reference card I
tried to improve.

Sebastian.

Jonathan Ploudre | 3 Jan 2005 01:11

Arbitrary Sort Script...

Hey There,

I'm new to Vim. I'm a family doctor so I write a lot of notes to keep 
track of what patients tell me. Patients tell me things in their own 
order but doctors have a set organization of how they write notes. So, 
my goal is to take notes as the patient talks and later have them 
auto-sort into the right order.

I've been using BBEdit on my mac to do text editing but the problem is 
that my current solution is not portable. And I get forced to use 
Windows at work. I think Vim is a great option since it's powerful like 
BBEdit but I can use it on Windows or FreeBSD or a Mac.

An acquaintance of mine wrote a short perl script for BBEdit to help do 
an arbitrary sort based on the way I wanted to do things. Basically, I 
make a tag on each line ended by a colon. It's sorta like e-mail 
headers.  If there is not a tag on the line, it's assumed to be related 
to the previous tagged line. Near the end the script does some 
formatting. Actually, I'd rather it didn't  do that but before I change 
it, let me ask my question.

  My question: Is it possible to re-write the script to work inside Vim?

I'm not a programmer (1 semester at college) but if it's doable, maybe 
I could learn enough to make it work. But I'd love to know that it was 
feasable before trying it out. Nothing in the FAQ or on the premade 
scripts looked useful.

Jonathan Ploudre

(Continue reading)

Steven Tryon | 3 Jan 2005 01:28
Picon

Re: Arbitrary Sort Script...

On Sun, 2005-01-02 at 16:11 -0800, Jonathan Ploudre wrote:
>   My question: Is it possible to re-write the script to work inside Vim?
> 
> I'm not a programmer (1 semester at college) but if it's doable, maybe 
> I could learn enough to make it work. But I'd love to know that it was 
> feasable before trying it out. Nothing in the FAQ or on the premade 
> scripts looked useful.

Being basically lazy, I would rewrite the script but mark the text and
pipe it out through the existing script with
! myscript

I do the same occasionally with the much more simple-minded sort
! sort

Steve
--

-- 
Steven Tryon
stryon <at> rochester.rr.com
ICQ 102798975

Suresh Govindachar | 3 Jan 2005 03:14
Picon
Favicon

Re: Arbitrary Sort Script...

Jonathan Ploudre wrote on 2 Jan 2005 16:11:57 -0800:

   that he has been using a perl script to sort text
   documents within the "BBEdit" editor;  and is curious
   about doing the same work from within the VIM editor.
   His perl script was provided by an acquaintance of his;
   he is a family doctor, not a programmer, but has had a
   semester of programming.

Good news!  VIM supports scripts written in perl.  It is a
simple task to take your perl script and a few lines of glue
code so that it can re-organize ("sort") text in a buffer.

It really is very easy, but I don't have the time to do it
for you.  Perhaps looking at the following might help you
(and/or your acquaintance) get started:   

  Vim's manual on using perl scripts:
     help perl-using  
  An example:
     http://www.vim.org/scripts/script.php?script_id=1082
  A tip (that might be somewhat confusing since it gets
  corrected in the notes written toward the end of the page)
     http://www.vim.org/tips/tip.php?tip_id=140

--Suresh

Stefan Kell | 3 Jan 2005 08:17
Picon
Picon

Re: Arbitrary Sort Script...

Hello Jonathan,

your perl skript is written as a filter and can be used inside vim without
problems. Take a look a the help file with ":help !" inside vim.

With Windows you will have to install a version of perl, perhaps from
ActiveState: "http://www.activestate.com/Products/ActivePerl/". There is a
skript included to convert a perl-skript to a bat-file so that you can use
the skript similiar to UNIX.

The embedded perl interpreter, mentioned in an outher post, has to be
compiled into vim, which might not be in your version of vim. You can
check this with ":version" inside vim.  But you don't need this for your
filter.

Regards

Stefan Kell

On Sun, 2 Jan 2005, Jonathan Ploudre wrote:

> Hey There,
>
> I'm new to Vim. I'm a family doctor so I write a lot of notes to keep
> track of what patients tell me. Patients tell me things in their own
> order but doctors have a set organization of how they write notes. So,
> my goal is to take notes as the patient talks and later have them
> auto-sort into the right order.
>
> I've been using BBEdit on my mac to do text editing but the problem is
(Continue reading)

Jingzhao Ou | 3 Jan 2005 09:08
Picon
Favicon

The Tcl interface

Dear all,

I am using gvim under Windows. I installed the big version with GUI. I 
typed :version and was able to see the following:

+tcl/dyn

I have ActiveTcl 8.4.9 installed on my computer and tclsh is added to 
the PATH environment variable. However, when I typed :echo has("tcl"), I 
get 0. And when I execute the following script:

function! DefineDate()
tcl << EOF
     proc date {} {
	return [clock format [clock seconds]]
     }
EOF
endfunction
echo DefineDate()

I got a complain saying that tcl83.dll is not found. Can anyone kindly 
tell me what is wrong with my settings?

Thanks a lot!

--

-- 
Jingzhao Ou ( a Tcl guy )


Gmane