OpenBSD Vim Programming FAQ

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

OpenBSD Vim Programming FAQ

Tomas Vavrys
I've decided to write Vim Programming FAQ. I'm not an expert and I
would like to start with less content and make it better over time.
However I might offer some practical tips, because I work with OpenBSD
and Vim everyday. As you can see I am not native English speaker so I
will definitely need english correction. I am willing to update it for
a long time. I just need for start one kind person with good english
skills and some tips how to manage code snippets for snipMate.
Community code snippets collection is my first task. I will appreciate
your code snippets which you often use (mail me off-list). A lot of
code snippets is in cvim plugin, but my priority is community and
practical habbits from more people.

--
Tomas Vavrys

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Tomas Vavrys
A lot of people has sent me their opinions or questions. Let's make it
clear. I don't want to do it Wiki-like, rather plain html page. It can
become manual page who knows... You can still help just by sending an
e-mail.

My goals are:

1) "Make everything as simple as possible, but not simpler."
- Plain HTML page, easy to manage plugins, be able to get to work
almost immediately and become instantly efficient

2) STYLE(9) will be our bible

3) Standardization
I would like to discuss hotkey's and abbreviation's names, settings
which prefer more people and I also want to make basic settings as a
standard for OpenBSD programmers. (It'll be a very hard task.)

4) SnipMate snippets
SnipMate offers code snippets not only for C language, but I am going
to focus on C programming. SnipMate is easy to handle and I can create
some snippets according to STYLE(9) for start. Time will show what is
missing etc.

5) Other plugins
- C reference Manual, Cscope

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Ingo Schwarze
Tomas Vavrys wrote on Thu, Aug 12, 2010 at 09:52:57AM +0200:

> I don't want to do it

Don't talk about what you want to do, just do it.
When it's done, tell people to look at the *result*
and decide whether it is useful or useless.

Shut up and hack.

> 2) STYLE(9) will be our bible

The style(9) manual is not a bible.  Sometimes, it is not followed
for good reasons.  You still need common sense.  Besides, it is
rarely updated.


Oh, and also note that "OpenBSD and vim" is a weird topic.
"OpenBSD and nvi" or "OpenBSD and mg" would seem more natural.
On the other hand, some people (including Marco) apparently
like the topic, so it may be useful.  But don't feel
disappointed if many people completely ignore your effort
because you are focussing on a non-standard combination.

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Tomas Vavrys
Thank you for your point. Unfortunately there is at least 7 people who
would like to see some tutorial. I am not a developer so I didn't know
about the style(9). Anyways, it's not about style(9). It's about people,
being more productive during programming, collecting habbits and tips
from OpenBSD programmers. It won't be perfect but I enjoy it.

2010/8/12 Ingo Schwarze <[hidden email]>:

> Tomas Vavrys wrote on Thu, Aug 12, 2010 at 09:52:57AM +0200:
>
>> I don't want to do it
>
> Don't talk about what you want to do, just do it.
> When it's done, tell people to look at the *result*
> and decide whether it is useful or useless.
>
> Shut up and hack.
>
>> 2) STYLE(9) will be our bible
>
> The style(9) manual is not a bible. B Sometimes, it is not followed
> for good reasons. B You still need common sense. B Besides, it is
> rarely updated.
>
>
> Oh, and also note that "OpenBSD and vim" is a weird topic.
> "OpenBSD and nvi" or "OpenBSD and mg" would seem more natural.
> On the other hand, some people (including Marco) apparently
> like the topic, so it may be useful. B But don't feel
> disappointed if many people completely ignore your effort
> because you are focussing on a non-standard combination.

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Jiri B.
----------------------------------------

> Date: Thu, 12 Aug 2010 13:07:47 +0200
> Subject: Re: OpenBSD Vim Programming FAQ
> From: [hidden email]
> To: [hidden email]
>
> Thank you for your point. Unfortunately there is at least 7 people who
> would like to see some tutorial. I am not a developer so I didn't know
> about the style(9). Anyways, it's not about style(9). It's about people,
> being more productive during programming, collecting habbits and tips
> from OpenBSD programmers. It won't be perfect but I enjoy it.

So first learn not to top post, it's about style :P

jirib

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Darrin Chandler
In reply to this post by Tomas Vavrys
On Thu, Aug 12, 2010 at 01:07:47PM +0200, Tomas Vavrys wrote:

> 2010/8/12 Ingo Schwarze <[hidden email]>:
> > Oh, and also note that "OpenBSD and vim" is a weird topic.  "OpenBSD
> > and nvi" or "OpenBSD and mg" would seem more natural.  On the other
> > hand, some people (including Marco) apparently like the topic, so it
> > may be useful. B But don't feel disappointed if many people
> > completely ignore your effort because you are focussing on a
> > non-standard combination.
> >
> Unfortunately there is at least 7 people who would like to see some
> tutorial.

I do not think it's a weird topic, and I know of developers aside from
Marco who use Vim (who have kindly shared some settings with me).

--
Darrin Chandler            |  Phoenix BSD User Group  |  MetaBUG
[hidden email]   |  http://phxbug.org/      |  http://metabug.org/
http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Aioanei Rares
In reply to this post by Tomas Vavrys
On Wed, 11 Aug 2010 21:43:09 +0200
Tomas Vavrys <[hidden email]> wrote:

> I've decided to write Vim Programming FAQ. I'm not an expert
[snip]
I can help with the correcting part and, since I also use vim, with some tips. Please note that I only have two days per week available for this, so if it's ok, let me know.

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Sam Fourman Jr.
In reply to this post by Tomas Vavrys
On Thu, Aug 12, 2010 at 6:07 AM, Tomas Vavrys <[hidden email]> wrote:
> Thank you for your point. Unfortunately there is at least 7 people who
> would like to see some tutorial. I am not a developer so I didn't know
> about the style(9). Anyways, it's not about style(9). It's about people,
> being more productive during programming, collecting habbits and tips
> from OpenBSD programmers. It won't be perfect but I enjoy it.

I would like to see a tutorial for vim and OpenBSD, it would be useful
a quick poll of my facebook friends I have 3 more that vote yes



--

Sam Fourman Jr.
Fourman Networks
http://www.fourmannetworks.com

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Tomas Vavrys
In reply to this post by Aioanei Rares
I am already writing and I don't want to hurry this thing up. It won't
be ready this week. Rather in two weeks. After that I will send it to
all of you who wants to help. Thank you for your patience.

2010/8/13 Rares Aioanei <[hidden email]>:
> On Wed, 11 Aug 2010 21:43:09 +0200
> Tomas Vavrys <[hidden email]> wrote:
>
>> I've decided to write Vim Programming FAQ. I'm not an expert
> [snip]
> I can help with the correcting part and, since I also use vim, with some tips. Please note that I only have two days per week available for this, so if it's ok, let me know.

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Tomas Vavrys
In reply to this post by Tomas Vavrys
After 2 months I have to announce that I am unable to finish the
guide. I am too busy at the moment and unfortunately I will be still
busy for a long time. Anyway, there has been a lot of people
interested in this guide, so I suppose someone could use my work/ideas
and make it come true.

Document link (First week progress)
https://docs.google.com/a/cleancode.cz/document/pub?id=11NGGh2Wbr7gESXCCxwHhwe35V_HCROMKNNIQE1qB6-0

Feel free to edit it, keep it or distribute it.

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Marco Peereboom
It asks for a password and shit.  Not sure how I could use this.

On Mon, Oct 04, 2010 at 11:32:10PM +0200, Tomas Vavrys wrote:

> After 2 months I have to announce that I am unable to finish the
> guide. I am too busy at the moment and unfortunately I will be still
> busy for a long time. Anyway, there has been a lot of people
> interested in this guide, so I suppose someone could use my work/ideas
> and make it come true.
>
> Document link (First week progress)
> https://docs.google.com/a/cleancode.cz/document/pub?id=11NGGh2Wbr7gESXCCxwHhwe35V_HCROMKNNIQE1qB6-0
>
> Feel free to edit it, keep it or distribute it.

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Tomas Vavrys
In reply to this post by Tomas Vavrys
Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Tomas Vavrys
I'll publish my .vimrc when I get home.

2010/10/5 David Coppa <[hidden email]>:

> On Tue, Oct 5, 2010 at 11:38 AM, Tomas Vavrys <[hidden email]> wrote:
>> I'm sorry. My bad.
>>
>> PDF Version
>> http://dl.dropbox.com/u/9017966/OpenBSDDevelopementandVimProgrammingGuide.pdf
>>
>> HTML Version
>> http://dl.dropbox.com/u/9017966/OpenBSDDevelopementandVimProgrammingGuide.zip
>
> Hi,
>
> What's the link to your .vimrc?
>
> cheers,
> david

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Alex Vladimirovich
 > I've decided to write Vim Programming FAQ.

I'm not breaking here to make any holy war of text
editors, but i'm *very* interesting did or will someone
work on similar guide for Emacs?



 > "OpenBSD and nvi"
quote: "vim is replacing nvi, since nvi does not have a pure BSD
license, and vim also works better."

Didn't that happen prior to 2.0 release? :)

 > "OpenBSD and mg"
quote from man page: "editor for people who can't (or don't want to)
run emacs for one reason or another".

This is not my case.

another quote "Since it is written completely in C, there is currently
no language in which you can write extensions".

That's not good for me.

So please if anybody is emacs-skilled and happily uses it on OpenBSD as
an instrument tell me your experience and/or send your configs.

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Christiano F. Haesbaert
In reply to this post by Tomas Vavrys
On 7 October 2010 16:39, Alex Vladimirovich <[hidden email]> wrote:
>
>> I've decided to write Vim Programming FAQ.
>
> I'm not breaking here to make any holy war of text
> editors, but i'm *very* interesting did or will someone
> work on similar guide for Emacs?
>
>

I've posted my openbsd c-style for emacs a while a go, should be on the lists.

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Vladimir Kirillov-2
In reply to this post by Darrin Chandler
On 11:43 Thu 12 Aug, Darrin Chandler wrote:

> On Thu, Aug 12, 2010 at 01:07:47PM +0200, Tomas Vavrys wrote:
> > 2010/8/12 Ingo Schwarze <[hidden email]>:
> > > Oh, and also note that "OpenBSD and vim" is a weird topic.  "OpenBSD
> > > and nvi" or "OpenBSD and mg" would seem more natural.  On the other
> > > hand, some people (including Marco) apparently like the topic, so it
> > > may be useful. B But don't feel disappointed if many people
> > > completely ignore your effort because you are focussing on a
> > > non-standard combination.
> > >
> > Unfortunately there is at least 7 people who would like to see some
> > tutorial.
>
> I do not think it's a weird topic, and I know of developers aside from
> Marco who use Vim (who have kindly shared some settings with me).

style(9):
Indentation is an 8 character tab.  Second level indents are four spaces.

        while (cnt < 20)
        z = a + really + long + statement + that + needs +
            two + lines + gets + indented + four + spaces +
            on + the + second + and + subsequent + lines;

How do you guys follow this rule in vim neatly?

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Sam Fourman Jr.
In reply to this post by Tomas Vavrys
On Tue, Oct 5, 2010 at 5:02 AM, Tomas Vavrys <[hidden email]> wrote:

> I'll publish my .vimrc when I get home.
>
> 2010/10/5 David Coppa <[hidden email]>:
>> On Tue, Oct 5, 2010 at 11:38 AM, Tomas Vavrys <[hidden email]> wrote:
>>> I'm sorry. My bad.
>>>
>>> PDF Version
>>> http://dl.dropbox.com/u/9017966/OpenBSDDevelopementandVimProgrammingGuide.pdf
>>>
>>> HTML Version
>>> http://dl.dropbox.com/u/9017966/OpenBSDDevelopementandVimProgrammingGuide.zip
>>
>> Hi,
>>
>> What's the link to your .vimrc?
>>


I would also like a decent .vimrc to copy on all of my OpenBSD installs

--

Sam Fourman Jr.
Fourman Networks
http://www.fourmannetworks.com

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

patrick keshishian
In reply to this post by Vladimir Kirillov-2
On Fri, Oct 8, 2010 at 3:27 PM, Vladimir Kirillov <[hidden email]>
wrote:

> On 11:43 Thu 12 Aug, Darrin Chandler wrote:
>> On Thu, Aug 12, 2010 at 01:07:47PM +0200, Tomas Vavrys wrote:
>> > 2010/8/12 Ingo Schwarze <[hidden email]>:
>> > > Oh, and also note that "OpenBSD and vim" is a weird topic.  "OpenBSD
>> > > and nvi" or "OpenBSD and mg" would seem more natural.  On the other
>> > > hand, some people (including Marco) apparently like the topic, so it
>> > > may be useful. B But don't feel disappointed if many people
>> > > completely ignore your effort because you are focussing on a
>> > > non-standard combination.
>> > >
>> > Unfortunately there is at least 7 people who would like to see some
>> > tutorial.
>>
>> I do not think it's a weird topic, and I know of developers aside from
>> Marco who use Vim (who have kindly shared some settings with me).
>
> style(9):
> Indentation is an 8 character tab.  Second level indents are four spaces.
>
>        while (cnt < 20)
>        z = a + really + long + statement + that + needs +
>            two + lines + gets + indented + four + spaces +
>            on + the + second + and + subsequent + lines;
>
> How do you guys follow this rule in vim neatly?

I haven't used vim since it's early 6.x days, but sts=4 maybe.

--patrick

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Ted Unangst-2
In reply to this post by Vladimir Kirillov-2
On Fri, Oct 8, 2010 at 6:27 PM, Vladimir Kirillov <[hidden email]>
wrote:
> style(9):
> Indentation is an 8 character tab.  Second level indents are four spaces.
>
>        while (cnt < 20)
>        z = a + really + long + statement + that + needs +
>            two + lines + gets + indented + four + spaces +
>            on + the + second + and + subsequent + lines;
>
> How do you guys follow this rule in vim neatly?

Write shorter lines.

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Vim Programming FAQ

Tobias Ulmer
In reply to this post by Vladimir Kirillov-2
On Sat, Oct 09, 2010 at 01:27:21AM +0300, Vladimir Kirillov wrote:
[...]

> style(9):
> Indentation is an 8 character tab.  Second level indents are four spaces.
>
> while (cnt < 20)
> z = a + really + long + statement + that + needs +
>    two + lines + gets + indented + four + spaces +
>    on + the + second + and + subsequent + lines;
>
> How do you guys follow this rule in vim neatly?
>

set cinoptions=:0,t0,+4,(4

12