On Fri, Aug 14, 2009 at 4:58 PM, Gary Johnson<[email protected]> wrote:
>
> On 2009-08-14, Gary Johnson wrote:
>
>> To fix b), change this section of autoload/notes.vim as shown:
>>
>>     16    catch
>>     17      exec 'sp "'.notePath.'"'
>>     18    endtry
>
> I guess a better solution would be to use fnameescape():
>
>    exec 'sp' fnameescape(notePath)
>
> Something I noticed is that if I execute ":Note", then change my
> mind and close the window/buffer without saving it, a new, empty
> file is created in my ~/Notes directory anyway.  I think a new file
> should not be created until the user decides to save his note.  You
> can give a name to the buffer without creating a file with the :f
> command, if that helps.
>

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)).

-- 
Hari

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

Raspunde prin e-mail lui