Vim plugin to maintain journal?

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

Vim plugin to maintain journal?

Foss User
I want to maintain a journal in a huge file. The format would be
somewhat like this.

* Jan 21, 2010
 * 1:45 AM
   * Posted this mail
   * Waiting for visitors to come
  * 5:50 AM
   * Found a new plugin to browser directories
* Jan 22, 2010
.. and so on ...

So, I would want to fold lines, etc. easily depending on the
indentation hierarchy. Is there any plugin that can do it? Is there
any vim script to maintain journals, TODO lists, etc.?

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Vim plugin to maintain journal?

Dennis Benzinger
Foss User wrote:

> I want to maintain a journal in a huge file. The format would be
> somewhat like this.
>
> * Jan 21, 2010
>  * 1:45 AM
>    * Posted this mail
>    * Waiting for visitors to come
>   * 5:50 AM
>    * Found a new plugin to browser directories
> * Jan 22, 2010
> .. and so on ...
>
> So, I would want to fold lines, etc. easily depending on the
> indentation hierarchy. Is there any plugin that can do it? Is there
> any vim script to maintain journals, TODO lists, etc.?
If you just need folding based on the indentation you can simply do:

:set foldmethod=indent

What other functionality do you need?


Regards,
Dennis Benzinger

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Vim plugin to maintain journal?

Thomas Adam-5
In reply to this post by Foss User
On Thu, Jan 21, 2010 at 01:51:19AM +0530, Foss User wrote:

> I want to maintain a journal in a huge file. The format would be
> somewhat like this.
>
> * Jan 21, 2010
> ?* 1:45 AM
> ? ?* Posted this mail
> ? ?* Waiting for visitors to come
> ? * 5:50 AM
> ? ?* Found a new plugin to browser directories
> * Jan 22, 2010
> .. and so on ...
>
> So, I would want to fold lines, etc. easily depending on the
> indentation hierarchy. Is there any plugin that can do it? Is there
> any vim script to maintain journals, TODO lists, etc.?
If you use vim-outliner, you get the folding for free, and a consistent
format for the sort of things you're describing above.

-- Thomas Adam

--
"It was the cruelest game I've ever played and it's played inside my head."
-- "Hush The Warmth", Gorky's Zygotic Mynci.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Vim plugin to maintain journal?

Christian Brabandt
In reply to this post by Foss User
Hi Foss!

On Do, 21 Jan 2010, Foss User wrote:

> I want to maintain a journal in a huge file. The format would be
> somewhat like this.
>
> * Jan 21, 2010
>  * 1:45 AM
>    * Posted this mail
>    * Waiting for visitors to come
>   * 5:50 AM
>    * Found a new plugin to browser directories
> * Jan 22, 2010

> So, I would want to fold lines, etc. easily depending on the
> indentation hierarchy. Is there any plugin that can do it? Is there
> any vim script to maintain journals, TODO lists, etc.?

set fdm=expr fde=indent(v:lnum)


regards,
Christian

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Vim plugin to maintain journal?

Foss User
In reply to this post by Dennis Benzinger
On Thu, Jan 21, 2010 at 2:01 AM, Dennis Benzinger
<[hidden email]> wrote:

> Foss User wrote:
>>
>> I want to maintain a journal in a huge file. The format would be
>> somewhat like this.
>>
>> * Jan 21, 2010
>>  * 1:45 AM
>>   * Posted this mail
>>   * Waiting for visitors to come
>>  * 5:50 AM
>>   * Found a new plugin to browser directories
>> * Jan 22, 2010
>> .. and so on ...
>>
>> So, I would want to fold lines, etc. easily depending on the
>> indentation hierarchy. Is there any plugin that can do it? Is there
>> any vim script to maintain journals, TODO lists, etc.?
>
> If you just need folding based on the indentation you can simply do:
>
> :set foldmethod=indent
>
Thanks. I tried this. Unfortunately, when I place the cursor on
"Posted this email" and press 'zc'  it folds it like this:

* Jan 21, 2010
 * 1:45 AM
   * Posted this mail ...
 * 1:48 AM
   * Foo bar
   * Foo bar 2

However, what I wanted was,

* Jan 21, 2010
  * 1:45 AM ...
  * 1:48 AM
    * Foo bar
    * Foo bar 2

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Vim plugin to maintain journal?

Stahlman Family
In reply to this post by Foss User


On Jan 20, 2:21 pm, Foss User <[hidden email]> wrote:

> I want to maintain a journal in a huge file. The format would be
> somewhat like this.
>
> * Jan 21, 2010
>  * 1:45 AM
>    * Posted this mail
>    * Waiting for visitors to come
>   * 5:50 AM
>    * Found a new plugin to browser directories
> * Jan 22, 2010
> .. and so on ...
>
> So, I would want to fold lines, etc. easily depending on the
> indentation hierarchy. Is there any plugin that can do it? Is there
> any vim script to maintain journals, TODO lists, etc.?
I do exactly this using 2 plugins:
Jnl (something I wrote for myself but never released formally)
Txtfmt (available on the Vim site)
http://www.vim.org/scripts/script.php?script_id=2208

I discussed my usage of these plugins for the application you've
described in a fairly recent Vim thread entitled "Is Vim just for
programmers?"

Here's the Google groups link:
http://groups.google.com/group/vim_use/browse_thread/thread/3b93aa1405c3ee16/926578d80caf45c9?lnk=gst&q=jnl+txtfmt#926578d80caf45c9

I'll try to take a screenshot of one of my journal files (I keep
several: e.g., understanding, professional, personal, ...), which
shows the folding, entry header highlighting, etc..., and make it
available online somewhere tonight so you can see if it looks like
what you had in mind. The main reason I've never released my Jnl
plugin is because I haven't had time to write the documentation, but
it's been very useful to me, and could be to others as well, so
perhaps I'll try to release it soon...

Sincerely,
Brett Stahlman

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Vim plugin to maintain journal?

victor-10
In reply to this post by Foss User
there is vimwiki

but after using that for about a year. i think (on my windows xp machine at least) that vim is not the software for this kind of thing.

the problem is not with entries, but with retrieval. you will be better off with a piece of software that comes with a live-search features. especially if you are going to take a large amount of notes like i did.

Foss User wrote
I want to maintain a journal in a huge file. The format would be
somewhat like this.

* Jan 21, 2010
 * 1:45 AM
   * Posted this mail
   * Waiting for visitors to come
  * 5:50 AM
   * Found a new plugin to browser directories
* Jan 22, 2010
.. and so on ...

So, I would want to fold lines, etc. easily depending on the
indentation hierarchy. Is there any plugin that can do it? Is there
any vim script to maintain journals, TODO lists, etc.?

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Vim plugin to maintain journal?

Stahlman Family
In reply to this post by Stahlman Family


On Jan 20, 3:24 pm, Brett Stahlman <[hidden email]> wrote:
> On Jan 20, 2:21 pm, Foss User <[hidden email]> wrote:
>
> > I want to maintain a journal in a huge file. The format would be
> > somewhat like this.
>
...snip...

>
> I do exactly this using 2 plugins:
> Jnl (something I wrote for myself but never released formally)
> Txtfmt (available on the Vim site)http://www.vim.org/scripts/script.php?script_id=2208
>
> I discussed my usage of these plugins for the application you've
> described in a fairly recent Vim thread entitled "Is Vim just for
> programmers?"
>
> Here's the Google groups link:http://groups.google.com/group/vim_use/browse_thread/thread/3b93aa140...
>
> I'll try to take a screenshot of one of my journal files (I keep
> several: e.g., understanding, professional, personal, ...), which
> shows the folding, entry header highlighting, etc..., and make it
> available online somewhere tonight so you can see if it looks like
> what you had in mind.
I uploaded a screenshot of a sample journal file to the following
location:
http://txtfmt.webs.com/jnlandtxtfmt.htm

Unfortunately, it's a bit garbled looking, but perhaps it will give
you some ideas...

Brett Stahlman
.
.
.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Vim plugin to maintain journal?

gar37bic
Another possible suggestion - use the docuwiki format, and save the
file as .wiki.  It's a simple format to use, and can be easily pushed
onto the web using docuwiki.  AFAI can tell the VIM wiki plugin
doesn't have folding support however.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Vim plugin to maintain journal?

Maxim Kim


On 22 янв, 16:27, Gary Bickford <[hidden email]> wrote:
>  AFAI can tell the VIM wiki plugin
> doesn't have folding support however.

As far as I know vimwiki has folding support. But it is quite slow
especially for a huge files.
For smaller ones it is more than useable though.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Vim plugin to maintain journal?

Vlad Irnov
In reply to this post by Foss User
On Jan 20, 3:21 pm, Foss User <[hidden email]> wrote:

> I want to maintain a journal in a huge file. The format would be
> somewhat like this.
>
> * Jan 21, 2010
>  * 1:45 AM
>    * Posted this mail
>    * Waiting for visitors to come
>   * 5:50 AM
>    * Found a new plugin to browser directories
> * Jan 22, 2010
> .. and so on ...
>
> So, I would want to fold lines, etc. easily depending on the
> indentation hierarchy. Is there any plugin that can do it? Is there
> any vim script to maintain journals, TODO lists, etc.?

Yet another suggestion: use start fold markers with levels.
I created the VOOF plugin exactly for such tasks:
http://www.vim.org/scripts/script.php?script_id=2657

I would fold individual days and use matching fold markers without
levels to fold large entries:

--- Jan 21, 2010 --- {{{1
        1:45 AM
Posted this mail
Waiting for visitors to come

        5:50 AM
Found a new plugin to browser directories

        12:00 AM
Did a lot of stuff: {{{
blah blah blah
bleh bleh bleh
}}}

--- Jan 22, 2010 --- {{{1
        .. and so on ...

Advantages of start fold markers with levels:
1. It's a built-in folding method -- :set fdm=marker
2. Suitable for any 'filetype'. Can outline source code. Indenting
can be used for formatting.
3. Matching fold markers without levels are handy for folding
arbitrary smaller regions.
4. Fast folding. Suitable for MB-sized files with thousands nodes.
As an example, see file calendar_outline.txt in the VOOF
distribution, which I created specifically for stress testing. It's
calendar for years 2009-2019, one node for each day: 3.1MB, 56527
lines, 4160 headlines.

Another poster mentioned problems with retrieval. This is indeed a
serious consideration. My current solution is the command :Voofgrep.
It's like :vimgrep but instead of showing matching lines it shows
matching nodes. Screenshot:
http://www.flickr.com/photos/voof/3821553772/sizes/o/
In a Vim script nodes are mostly functions. So ":Voofgrep some_var"
produces list of functions where some_var is used.

Regards,
Vlad

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