On 2009-08-18, Hari Krishna Dara wrote:
> On Sun, Aug 16, 2009 at 5:14 PM, Gary Johnson<[email protected]> wrote:
> >
> > On 2009-08-16, Hari Krishna Dara wrote:
> >
> >> Thanksa lot Gary, for all the issue reports. To summarize what you
> >> have already observed:
> >> - 'fileformat' needs to be changed to "unix".
> >> - g:notesRoot should accept any path that is recognized by Vim.
> >> - On a unix like system, paths with spaces are not handled correctly.
> >>
> >> On the last issue, I am surprised that spaces cause problems. The
> >> :edit, :split and :write commands expect only one file and so
> >> shouldn't treat spaces specially, and that is how it works in windows.
> >> I just looked up help on these commands and there is no mention of
> >> such a need. I will anyway try fnameescape() to see if it fixes the
> >> issue. I don't currently have a linux install handy, but I can
> >> probably reproduce the same issue on mac os x that I just started
> >> using (or may be I can try a livecd).
> >>
> >> On the subject of using underscores instead of spaces, I think spaces
> >> will make the name a lot more readable. But if this would be something
> >> of a preference, then one option is to provide a setting (such as
> >> g:notesWordSeparator that can be set to useful strings such as "_",
> >> ".", "-" or even "" (empty string)).
> >
> > You're welcome.  I think it will be a really handy package.
> >
> > I really dislike spaces in file names because I do most of my file
> > manipulation from a Unix command line where spaces are separators
> > and using file names that have spaces requires a lot of extra typing
> > and thinking.  I realize, though, that GUI users don't have those
> > issues and find spaces aesthetically pleasing, so having an option
> > such as you propose would be a good solution.
> 
> I uploaded a new version with all these changes. Please give it a shot
> and let me know what you think.
> 
> http://www.vim.org//script.php?script_id=2732

Thanks!

I'm not having any of the problems I had before with paths or names,
but I am having problems with naming the note file myself.
According to the script page,

    Starting to take a new note should be as simple as typing :Note.
    Enter your text and save to generate a name automatically based
    on the first line. You can also start typing in an unnamed
    buffer (created using <Ctrl-W>n) and later convert it as a note
    using :NoteAsNew command (again named automatically based on the
    first line).

I thought these worked before (in version 1.8), but neither seems to
work now.  I have these set in my ~/.vimrc:

    let g:notesRoot = "~/Notes"
    let g:notesWordSeparator = ""

Starting with an empty ~/Notes directory, I open some file in my
home directory, then execute ":Note".  A new buffer appears in a
split window with the name "~/Notes/NewNote.txt".  I enter the
following lines in the buffer:

    hello

    This is a note about "hello".

with the expectation that the buffer will be saved as "hello.txt".
The ":NoteAsNew" command reports, "This command works only on
unnamed buffers", and simply writing the buffer with ":w" updates
the existing ~/Notes/NewNote.txt file with the new text.

Similarly, opening a new buffer with the ":new" command, entering
the same text, and executing the ":NoteAsNew" command creates a new
file with the name "~/Notes/NewNote1.txt".  Again, no use of the
first line in the file name.

    :echo g:notesSyncNameAndTitle

displays "1".

Also, I would still rather that Notes deferred creating the notes
file until I write it, so that I can abandon a new note without
having to remember to rm or :NoteRemove it.

Regards,
Gary



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

Raspunde prin e-mail lui