cwoac/nvvim

Empty extension (no "." in file name) of files is not supported

Closed this issue · 10 comments

I need Empty extension of files because I use SoyWiki ( https://github.com/danchoi/soywiki ) and it works only with empty extension.
When I set it like this:

let g:NVIM_extension = ''

and delete files or update index with "python nvimdb.rebuild_database()"

I get error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/mikhailgranin/bin/dotfiles/vim/bundle/nvim/python/nvim.py", line
58, in rebuild_database
    self.update_file(f)
  File "/Users/mikhailgranin/bin/dotfiles/vim/bundle/nvim/python/nvim.py", line
64, in update_file
    fh = open( filename, 'r' )
IOError: [Errno 21] Is a directory: 'nvimi'

in general I see that database folder is included in indexing, I tried changing the directory used for the note database replacing in :

let g:NVIM_database  = '.nvim'

'.nvim' with every possible option but it's still giving same error.

Please update code so that empty extension (no "." in file name) of files is working.

@cwoac , Thank you for such an amazing plugin! This is single tool out of hundreds of plugins and applications that unified all my workflow into one solid system inside Vim. This issue is just an effort to make your plugin even more powerful, making it compatible with SoyWiki, product in some ways similar, but without some key features like full text search that you implemented. SoyWiki is great as power editor, hope you'll help me to unify two.

Hmmm. Will have a look into it.

Thank you @cwoac ! I've already forked your project and got some experiments on it (really minor ones), so if you have any ideas on how I can resolve this issue myself, let me know.

Okay, so I'm pretty sure I've fixed it, but I'm not in a position to test it properly right now (long story).

I figure it's probably worth putting the code up here so you can have a look at it if you want while I kick my system into shape.

Thank you! Will test it and let you know how it works for me.

It works for starting from scratch but when I'm trying to import old notes it's broken:

:python nvimdb.rebuild_database() always returns 

returns

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/mikhailgranin/bin/dotfiles/vim/bundle/nvim/python/nvim.py", line
58, in rebuild_database
    self.update_file(f)
  File "/Users/mikhailgranin/bin/dotfiles/vim/bundle/nvim/python/nvim.py", line
64, in update_file
    fh = open( filename, 'r' )
IOError: [Errno 21] Is a directory: '.nvimi'

Sorry, I should have been clearer - I've checked my (suggested) fix into a new branch empty_extension - see 1e35910. From your error message you are still on master

ok! I’ll check it.

On 31 Mar 2015, at 17:15, Oliver Matthews notifications@github.com wrote:

Sorry, I should have been clearer - I've checked my (suggested) fix into a new branch empty_extension - see 1e35910 1e35910. From your error message you are still on master


Reply to this email directly or view it on GitHub #35 (comment).

Any luck?

I've got my development environment sorted and have checked (and fixed) the issue. Hope it helps.