Linda W | 1 Jan 2010 03:10

conflicting options: smartindent & 'fo+=a'

I am trying to insert a bunch of ugly text in 'css', and using
syntax='css', si, (tried w/ai & /noai), and using formatoptions
tag 'a'.

I'm running into a minor conflict versus what I expect. 

Any time a line starts with a '.', everything gets indented 
a further level (even though there's no nesting).

As near as I can tell, what's happening is this:

input:
---
.sel {
blah;
blah2;
}

.sel2 {
bbb;
ccc;
}

next {
xxx;
}
---
becomes:
.sel { blah;
    blah2; }
(Continue reading)

Tony Mechelynck | 1 Jan 2010 04:03
Picon
Gravatar

Re: conflicting options: smartindent & 'fo+=a'

On 01/01/10 03:10, Linda W wrote:
> I am trying to insert a bunch of ugly text in 'css', and using
> syntax='css', si, (tried w/ai&  /noai), and using formatoptions
> tag 'a'.
>
> I'm running into a minor conflict versus what I expect.
>
> Any time a line starts with a '.', everything gets indented
> a further level (even though there's no nesting).
>
> As near as I can tell, what's happening is this:
>
> input:
> ---
> .sel {
> blah;
> blah2;
> }
>
> .sel2 {
> bbb;
> ccc;
> }
>
> next {
> xxx;
> }
> ---
> becomes:
> .sel { blah;
(Continue reading)

Tony Mechelynck | 1 Jan 2010 05:50
Picon
Gravatar

Re: How to compile with guifont ?

On 30/11/09 14:59, Timothy Madden wrote:
> Hello
>
> I compiled vim on a debian server and installed in in my home folder
> (~/usr/local),
> but the resulting executable can see no fonts when I press Tab on
>     :set guifont=<Tab>
> and the default font is looking too condensed. The Edit menu has no GUI
> Font entry.
>
> I use ssh -Y to run gvim on my local desktop (with Ubuntu 9.10).
>
> fc-list shows many, many
> fonts installed (also locally in my home folder) on the server, and the
> desktop machine also
> has a GUI desktop with all the fonts.
>
> My :version is
> :version
> VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Nov 27 2009 14:45:34)
> Compiled by adrianc <at> web3.storm.lan
> Normal version with X11-Athena GUI.  Features included (+) or not (-):
[...]

Any Vim GUI can set the font; the problem is that only some of them (not 
including yours, apparently) can tell you from which fonts it is 
possible to choose. So you'll have to guess.

If you have the LucidaTypewriter font installed (on the computer where 
gvim is running), you might try
(Continue reading)

Dominique Pellé | 1 Jan 2010 11:42
Picon

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=*

(Continue reading)

Daniel Fetchinson | 1 Jan 2010 12:34

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).
>>>>
(Continue reading)

Anthony Campbell | 1 Jan 2010 13:14
Picon

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 <at> 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

(Continue reading)

Marc Weber | 1 Jan 2010 13:40
Picon
Picon

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.
(Continue reading)

Christian Brabandt | 1 Jan 2010 13:46

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 <at> 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
(Continue reading)

Anthony Campbell | 1 Jan 2010 14:14
Picon

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 <at> 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
(Continue reading)

Tim Chase | 1 Jan 2010 14:50

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 
(Continue reading)


Gmane