neilagabriel / vim-geeknote

Vim plugin for Geeknote
233 stars 16 forks source link

Permission Error when `:Geeknote` #33

Closed m-note closed 8 years ago

m-note commented 8 years ago

This is the same issue posted on StackExchange

I was trying to use vim-geeknote in MacVim (Kaoriya Edition, MacVim modified for Japanese environment).

I followed the official way of installing geeknote and it works in terminal (with sudo).

I used NeoBundle to install vim-geeknote, writing the following code in ~/.vimrc:

" Geeknote
NeoBundle 'sudo.vim'
NeoBundle 'neilagabriel/vim-geeknote'
noremap <F8> :Geeknote<cr>
let g:GeeknoteMaxExplorerWidth=60

However, when I execute :Geeknote in MacVim, I got an error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/Tak/.vim/bundle/vim-geeknote/plugin/vim_geeknote.py", line 4, in <module>
    from explorer import Explorer
  File "/Users/Tak/.vim/bundle/vim-geeknote/plugin/explorer.py", line 4, in <module>
    from view   import *
  File "/Users/Tak/.vim/bundle/vim-geeknote/plugin/view.py", line 4, in <module>
    from enml  import *
  File "/Users/Tak/.vim/bundle/vim-geeknote/plugin/enml.py", line 5, in <module>
    from geeknote.out    import *
  File "/Library/Python/2.7/site-packages/geeknote-0.2a-py2.7.egg/geeknote/out.py", line 11, in <
module>
    from editor import Editor
  File "/Library/Python/2.7/site-packages/geeknote-0.2a-py2.7.egg/geeknote/editor.py", line 16, i
n <module>
    from log import logging
  File "/Library/Python/2.7/site-packages/geeknote-0.2a-py2.7.egg/geeknote/log.py", line 11, in <
module>
    logging.basicConfig(format=FORMAT, filename=config.ERROR_LOG)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.p
y", line 1545, in basicConfig
    hdlr = FileHandler(filename, mode)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.p
y", line 911, in __init__
    StreamHandler.__init__(self, self._open())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.p
y", line 941, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/Users/Tak/.geeknote/error.log'

Since the permission is denied, I tried:

but they don't work and I keep getting the same error.
Is there any way to execute commands with sudo? Or are there any better way for this issue?