Friday, January 1, 2010

Re: Is vim just for programmers?

> Searching the web for people's views on writing methods I
> found a number who said that one should use vim for
> programming but emacs for other kinds of writing. So I had a
> look at emacs out of curiosity but couldn't see any real
> advantage for me in learning it. Am I missing something here?
> Is anyone else still using vim for writing lengthy texts?

Me :)

Yes, there's a decently sized contingent of [La]TeX users on the
vim ML, but they mostly appear to answer questions about
Vim+[La]TeX integration plugins or use, and then they go silent.
Which is how the list works in general -- ask a question and
usually the right people pick up on it and answer; instead of
having people write unsolicited diatribes on their favorite
topics whether [La]TeX, scripting, Ex commands, or
Unicode/BOM/character-encodings stuff (though I've gotta admit
that just about everything I know regarding U/BOM/ce, I've
learned from Tony's elucidating replies that occasionally go off
on pedantic dissertations -- thanks, Tony!).

I think Vim's primary users are "people who want to edit text
more efficiently". A large subset of those lazy people (self
included) are programmers, but do include [La]TeX users, system
administrators, people who email a lot and use Vim as an external
editor...and the list goes on. I tinkered with Emacs but grew
frustrated with (1) using it over remote SSH/telnet/RS-232
connections that didn't always reliably send things like alt/meta
or arrow keys; (2) at the time, on my underpowered 486 DX/100,
Emacs was a dog; and (3) it was harder to be productive out of
the box without amassing a customized config file that I then had
to tote around and keep in sync across machines. Tim O'Reilly
had a good post[1] about this around the time I made the
full-time jump to Vim.

So now I use Vim like I used to use qedit in DOS to write all my
papers, project documentation, code, and other text-format
content. Except, well, email and text-boxes on web pages (though
there are TB/FF plugins for that)

-tim

[1]
http://oreilly.com/pub/a/oreilly/ask_tim/1999/unix_editor.html


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Is vim just for programmers?

On 01 Jan 2010, Marc Weber wrote:
> Hi Anthony,
>
> Asking such general questions doesn't make sense in practise. (IMHO).
>

I must have phrased this badly. I was just wondering what other people's
experience was and if there were others who were using vim for general
writing and editing. More out of curiosity than anything else.

> If it comes to writing books there is no easy answer either.
> Eg Emacs has some plugins to preview LaTex formulars.
> Vim will never do this.

LyX does. One of the reasons I use it.

> If you consider using a non distracting editor such as
> http://they.misled.us/dark-room

I don't use Windows.

Regards,

Anthony

--
Anthony Campbell - ac@acampbell.org.uk
Microsoft-free zone - Using Debian GNU/Linux
http://www.acampbell.org.uk - sample my ebooks at
http://www.smashwords.com/profile/view/acampbell
Wi

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: netrc syntax - adding 'account'

Hi Mantas!

On Fr, 01 Jan 2010, Mantas Mikulėnas wrote:

> I have noticed that vim 7.2's syntax file for ~/.netrc does not have
> support for 'account' keyword (which is probably quite rare but still
> used for various not-even-related-to-FTP purposes), so I added it
> myself. It's a very minor change - <http://sprunge.us/VgZX> - but I
> still would like it to be included with the next version of vim
> ('account' is defined in manpage of ftp(1)). Being very new to the vim
> community and everything, I'm asking where should I ask for that.

Thanks for letting us know. You can find the maintainer of the syntax
file in the header of the appropriate syntax .vim file. According to my
locale vim runtime files, it is Nikolai Waibull, who maintains the
netrc.vim file:


,----[ head -n5 ~/local/share/vim/vim72/syntax/netrc.vim ]-
| " Vim syntax file
| " Language: netrc(5) configuration file
| " Maintainer: Nikolai Weibull <now@bitwi.se>
| " Latest Revision: 2006-04-19
`----

I am CC'ing the maintainer to make sure, he receives your info. You
should however check, whether your change isn't already included in the
latest runtime files available at http://www.vim.org/runtime.php

regards,
Christian
--
Der Simulant von Zimmer 12 ist tot. Darauf der Arzt: "Jetzt übertreibt
er aber."

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Is vim just for programmers?

Hi Anthony,

Asking such general questions doesn't make sense in practise. (IMHO).

If you want to get a job done and if you want to know whether Vim is a
great tool to get the job done than ask how to setup Vim to assist you.

See :h design-not

Follow Bram's advice: Watch yourself. Try to find out on which things
you spend most time and try to speed up those tasks. If you don't know
how to do this get help (ig by chatting on irc).

Vim is good at this: You can speed up many tasks easily.
If it comes to more advanced things such as IDE features (code
completion etc.).. you still can make Vim use languages which can do the
task for you. Examples: Eclim (headless eclipse) or scion (Haskell on
the fly syntax checker)

Using other editors one of those things which can slow down is switchi
mouse / keyboard. Using Vim you don't have switch because you can do
everything you like using the keyboard.

One bad thing about Vim is that you can't quit if you've never done that
before even though the start screen tells you to run :q
At least I didn't understand it that time.

If it comes to writing books there is no easy answer either.
Eg Emacs has some plugins to preview LaTex formulars.
Vim will never do this.

Programmers naturally write much text. And vim assists you very well.
Many people (including me) use Vim even if it has some weakness such as
not being able to receive feedback from other applications in a
concurrent way. You need such a feature to implement debugger
integration.. (Yes I know there are many workarounds. I wrote one
myself. But Vim itself is not thread safe which says all...)

That's why I end up coding in Vim while using Eclipse for debugging..

I also write Emails using Vim.
I keep many notes in files I manage with Vim.

Use the tool which is best for a given task.
Use google and irc to find out which tool that is.


If you consider using a non distracting editor such as
http://they.misled.us/dark-room
keep in mind that it takes less than 5 configuration lines to make Vim
fit this use case as well.
Have a look at :h motion to find out why Vim might be a better choice
for writing text. Than compare this list with the features other text
editor provide. Also keep in mind that it's very easy to script Vim.

Marc Weber

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Is vim just for programmers?

Having recently rather unexpectedly found myself back on this list after
being unable to get on it for several years, I seem to see a difference
in emphasis. Most people who post here appear to be programmers,
whereas previously there were other kinds of users as well. Nothing
wrong with that, of course, and I'm not trying to start a flame war. But
I'm not a programmer yet I use vim for all my writing and I'm wondering
if I'm unusual.

I write books among other things, and for that I first compose the text
in vim, which allows me to concentrate on the meaning withoug bothering
about the appearance, and then transfer it to LyX for final formatting.
I find it useful to have these two different phases in writing. What I
like about vim is the possibility to make quick transpositions of blocks
of text and other changes. I usually end up with several files
containing different versions of what I've written.

Searching the web for people's views on writing methods I found a number
who said that one should use vim for programming but emacs for other
kinds of writing. So I had a look at emacs out of curiosity but couldn't
see any real advantage for me in learning it. Am I missing something
here? Is anyone else still using vim for writing lengthy texts?


Anthony

--
Anthony Campbell - ac@acampbell.org.uk
Microsoft-free zone - Using Debian GNU/Linux
http://www.acampbell.org.uk - sample my ebooks at
http://www.smashwords.com/profile/view/acampbell

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: very simple braces based folding

> I'm somewhat confused, as folding works perfectly fine for me
> even without the patch. Can you please check if your javascript.vim
> is exactly the same as mine? (see attached).

Yes, I have the same file, it's the one that ships with vim 7.2

What I did was copying your javascript.vim to my
~/.vim/syntax/javascript.vim and tweaked it there. Now I have what I
initially wanted, because I changed the folding region to be bounded
by ^{$ and ^}$ because I always put the opening and closing braces of
functions in their own lines. Also, I changed the fold text to tell me
the number of lines and also applied the patch that was sent by
Christian. And now everything is good!

Cheers,
Daniel


>>> Hi Daniel!
>>>
>>> On So, 27 Dez 2009, Daniel Fetchinson wrote:
>>>
>>>
>>>> void x( )
>>>> -----------------folded--------------
>>>> void y( )
>>>> -----------------folded--------------
>>>>
>>>> And if the folded regions are unfolded, there are no enclosed folds
>>>> either (only top level braces are folded).
>>>>
>>>> This is all good.
>>>>
>>>> Now I have a hard time reproducing all of this with javascript files :(
>>>>
>>> If I read syntax/javascript.vim correctly you need to enable syntax
>>> based folding by setting :let javaScript_fold=1 in e.g. your .vimrc.
>>>
>>> However there seems to be a bug with syntax based folding, which
>>> prevents folding. The following patch works for me (I understand syntax
>>> rules only very basically), therefore cc'ing the maintainer Claudio
>>> Fleiner.
>>>
>>> chrisbra@256bit:~/local/share/vim/vim72/syntax$ diff -Nu
>>> javascript.vim{.orig,}
>>> --- javascript.vim.orig 2009-12-29 14:12:39.000000000 +0100
>>> +++ javascript.vim 2009-12-29 14:12:42.000000000 +0100
>>> @@ -47,7 +47,7 @@
>>> syn keyword javaScriptRepeat while for do in
>>> syn keyword javaScriptBranch break continue
>>> syn keyword javaScriptOperator new delete instanceof typeof
>>> -syn keyword javaScriptType Array Boolean Date Function
>>> Number
>>> Object String RegExp
>>> +syn keyword javaScriptType Array Boolean Date Number Object
>>> String RegExp
>>> syn keyword javaScriptStatement return with
>>> syn keyword javaScriptBoolean true false
>>> syn keyword javaScriptNull null undefined
>>>
>>> The problem seems to be that the syntax keywod javaScriptType
>>> takes precedence over the defined region javaScriptFunction and
>>> therefore prevents that the syntax folding applies. Claudio probably
>>> knows better if this is true and how to fix the problem.
>>>
>>> regards,
>>> Christian
>>>
>>
>> Thanks Christian!
>>
>> Your patch does indeed fix the problem!
>>
>> Cheers,
>> Daniel
>>
>>
>>
>


--
Psss, psss, put it down! - http://www.cafepress.com/putitdown

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: How to compile with guifont ?

Matt Wozniski wrote:

> On Wed, Dec 2, 2009 at 8:27 AM, Timothy Madden wrote:
>> :set guifont=*
>>
>> Works on Win32, GTK, Mac OS and Photon. Looks like I have none of
>> these.
>> Thank you for the answers. I think I have to leave this problem as it
>> is for
>> now ...
>
> It also works fine for my gvim, which is X11-Motif... I'd be really
> surprised if it doesn't work with X11-Athena...
>
> ~Matt


":help 'guifont'" says...
======================================
For Win32, GTK, Mac OS and Photon: >
:set guifont=*
< will bring up a font requester, where you can pick the font you want.
======================================

... which implicitly means that ":set guifont=*" is not possible for
Athena GUI. And "set guifont=*" does not work indeed with Athena
GUI. It gives:

E236: Font "*" is not fixed-width
E596: Invalid font(s): guifont=*

Motif is not listed either, but doing ":guifont=*" with Motif does
bring a popup window to chose the font. So I think Motif should
be listed in the help page:

$ diff -c options.txt.orig options.txt
*** options.txt.orig 2010-01-01 11:39:25.502514991 +0100
--- options.txt 2010-01-01 11:39:31.377465863 +0100
***************
*** 3250,3256 ****
the case of X). The font names given should be "normal" fonts. Vim
will try to find the related bold and italic fonts.

! For Win32, GTK, Mac OS and Photon: >
:set guifont=*
< will bring up a font requester, where you can pick the font you want.

--- 3250,3256 ----
the case of X). The font names given should be "normal" fonts. Vim
will try to find the related bold and italic fonts.

! For Win32, GTK, Motif, Mac OS and Photon: >
:set guifont=*
< will bring up a font requester, where you can pick the font you want.

-- Dominique

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php