On Wed, Jul 29, 2009 at 7:21 AM, Toni Ruottu<toni.ruottu@...
> I'm glad to see someone working on this. I'm rather busy at the
> moment, but I'm willing to test it once it is supposed to work. In
> case the script becomes stable, would turning it into a standard
> feature. I'm ok with using some special command for storing the
> current buffer into a note (instead of a file), but I'll probably be
> too lazy to install an extension on each system separately.
I am attaching a plugin but you do need to install it on each system
separately. However, it is very simple to do so, just unzip it into
your .vim/vimfiles directory and add one line to your vimrc (e.g., let
g:notesRoot = "c:/notes"). I wouldn't expect this to be part of core
vim functionality, as it is something that can be achieved using a
plugin like this, however some changes to the core could help improve
the experience (e.g., there is no way to trap :w on an unnamed buffer,
Vim simply gives an error, no matter what autocommands are defined).
Judging by your previous messages, here is how I think you would use the plugin:
- Type :Note command with no arguments when you start taking a new
note consciously. Save the note just like any other file using :w
- Start typing in an unnamed buffer, but use :NoteAsNew command when
you are done. Unfortunately, :w at this point will give you the same
error message that you are familiar with and despise, but at least you
don't have to think about a filename and location, if you simply use
Feel free to define maps for the above commands to make it easier to
use them. I have some more documentation below (which is also
available in the plugin/notes.vim file) that describes the additional
functionality. I have been using the plugin for myself (as I said I
wanted it myself) and find it usable, but feedback from others will
help shape it better.
- In vimrc, let g:notesRoot to the root directory holding/containing
all your notes.
- Use ":Note" command to create or open notes.
- All note files are regular text files, but they are special to the
plugin only if they live under the g:notesRoot directory.
- You can also open existing note files by using regular vim commands or
file browsers. However, ":Note" command provies completion that could
make it easier to find a note.
- Usage: Note [<relPathToDir>|<name>|<fullPathToDir>|<fullPathToName>]
<no arguments> - create a new note in the root.
<relPathToDir> - create a new note in an existing subdir
<name> - create a new note or open an existing note with
the specified name in the root dir.
<fullPathToDir> - to create a new note under the specified
path (path should be under root)
<fullPathToName> - to create a new note or open an existing
note with the specified path.
- You can use ":NoteNewFolder" to create subdirectories under the root with
the convenience of completion.
- Use ":NoteSyncFilename[!]" to sync the filename of the note to the first line
in the note. This is to trigger the process when g:notesSyncNameAndTitle
is disabled (see below). Use bang to force a save when the buffer is
- Use :NoteAsNew command instead of :w to save notes taken in an unnamed
buffer with an autogenerated name under the root directory.
- ":NoteGrep[!] <pat>" command is a shortcut to invoke :vimgrep on the
subfolder. If the pattern is not enclosed, it will be automatically
enclosed in /'es. If the pattern itself has /'es or you need to pass
flags, then you need to enclose the pattern yourself with any flags at
the end. See help on vimgrep for details.
- ":NoteBrowse" is a simple shortcut to open the root directory, which
will open the directory in your default file explorer.
- g:notesRoot - Sets the root directory path.
- g:notesDefaultName - The default name used for notes (without any
- g:notesMaxNameLenth - An integer that limits the length of generated names.
- g:notesSyncNameAndTitle - Allows automatically renaming notes on save,
based on the first non-empty line. When
disabled, use :NoteSyncFilename to manually
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php