Git Product home page Git Product logo

vim-geeknote's People

Contributors

geiren avatar neilagabriel avatar nvgabriel avatar pushcx avatar yuex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-geeknote's Issues

Does not work when python2 is not available

With the introduction of vim8, the debian packagers have decided to remove "python2" support from vim, completely switching to python3.
This plugin does not work anymore. It throws the following error:

Error detected while processing vim_geeknote.vim:
line 1:
E319: Sorry, the command is not available in this version: python import sys
line 2:
E319: Sorry, the command is not available in this version: python import vim
line 3:
E319: Sorry, the command is not available in this version: python sys.path.append(vim.eval('expand(":h")'))

Neovim support

I've had no issues using this plugin with Vim. However, when I launch it in Neovim, I get the following error on trying the :Geeknote command....

Error detected while processing function Vim_GeeknoteToggle..provider#python#Call:
line   12:
IndexError('list index out of range',)

...and this error on the :GeeknoteSync command.

Error detected while processing function Vim_GeeknoteSync..provider#python#Call:
line   12:
IndexError('list index out of range',)

I'm guessing this is because of some difference in the underlying plugin APIs. Do you have any plans for porting this plugin to Neovim? An example of a plugin ported from Vim to Neovim is the vim R plugin (original, port).

Error detected while processing function Vim_GeeknoteToggle

I use Pathogen. At ~/.vim/bundle/ I cloned repository, opened text file in vim and have typed:
:Geeknote:

line    4:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ubuntu/.vim/bundle/vim-geeknote/plugin/vim_geeknote.py", line 4, in <module>
    from explorer import Explorer
  File "/home/ubuntu/.vim/bundle/vim-geeknote/plugin/explorer.py", line 4, in <module>
    from view   import *
  File "/home/ubuntu/.vim/bundle/vim-geeknote/plugin/view.py", line 4, in <module>
    from enml  import *
  File "/home/ubuntu/.vim/bundle/vim-geeknote/plugin/enml.py", line 5, in <module>
    from geeknote.out    import *
ImportError: No module named geeknote.out

I have installed vim from Ubuntu repository of current LTS (14.04): 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:32)

UserWarning: No parser was explicitly specified

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
    beautifulsoup4-4.4.0-py2.7.egg/bs4/__init__.py:166: 
 UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser 
 for this system ("html.parser"). This usually isn't a problem, but if you run this code on
 another system, or in a different virtual environment, it may use a different parser and behave
 differently.
To get rid of this warning, change this:
 BeautifulSoup([your markup])
to this:
 BeautifulSoup([your markup], "html.parser")

When open file.

Change enml.py

 19             soup = BeautifulSoup(contentENML.decode('utf-8'))

to

 19             soup = BeautifulSoup(contentENML.decode('utf-8'), 'html-parser')

resolved.

IndexError: list index out of range

Hi

here's another error encountered during vim-geeknote daili-use.

This time is very specific.

After adding this page via Evernote Web Clip on Google Chrome (Linux) (Whole article)
http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim

trying to open it via vim-geeknote results in:

Error detected while processing function Vim_GeeknoteActivateNode:
line 4:
Traceback (most recent call last):
File "", line 2, in
File "/home/mbini/.vim/plugin/vim_geeknote.py", line 35, in GeeknoteActivateNode
explorer.activateNode(vim.current.line)
File "/home/mbini/.vim/plugin/explorer.py", line 368, in activateNode
node.activate()
File "/home/mbini/.vim/plugin/explorer.py", line 234, in activate
GeeknoteOpenNote(self.note)
File "/home/mbini/.vim/plugin/view.py", line 113, in GeeknoteOpenNote
content = ENMLtoText(note.content)
File "/home/mbini/.vim/plugin/enml.py", line 29, in ENMLtoText
return Editor.ENMLtoText(contentENML)
File "/usr/local/lib/python2.7/dist-packages/geeknote-0.2a-py2.7.egg/geeknote/editor.py", line 56, in ENMLtoText
section.replace_with( section.contents[0] )
IndexError: list index out of range
Error detected while processing function Vim_GeeknoteActivateNode:
line 4:
Traceback (most recent call last):
File "", line 2, in
File "/home/mbini/.vim/plugin/vim_geeknote.py", line 35, in GeeknoteActivateNode
explorer.activateNode(vim.current.line)
File "/home/mbini/.vim/plugin/explorer.py", line 368, in activateNode
node.activate()
File "/home/mbini/.vim/plugin/explorer.py", line 234, in activate
GeeknoteOpenNote(self.note)
File "/home/mbini/.vim/plugin/view.py", line 113, in GeeknoteOpenNote
content = ENMLtoText(note.content)
File "/home/mbini/.vim/plugin/enml.py", line 29, in ENMLtoText
return Editor.ENMLtoText(contentENML)
File "/usr/local/lib/python2.7/dist-packages/geeknote-0.2a-py2.7.egg/geeknote/editor.py", line 56, in ENMLtoText
section.replace_with( section.contents[0] )
IndexError: list index out of range

screenshot attached for the error and the web clipper while clipping the page (to show the options)

selection_013
workspace 2_010

Permission Error when `:Geeknote`

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:

  • sudo chmod a+rw /Library/Python/2.7/
  • sudo chmod a+rw /System/Library/Frameworks/Python.framework/Versions/2.7/

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?

Searhing Notes

Hi,
am I dumb (likely) or is there no search functionality?

Unable to open file in Neovim 0.1.7

Thanks for a great plugin!

I've been able to open file tree, but neovim errors time everytime I try to open a file.
Any idea what's causing it?

Neovim version: 0.1.7
Geeknote Version: 2.0.12

Error detected while processing function Vim_GeeknoteActivateNode[4]..provider#python#Call:                                                                                
line   18:                                                                                                                                                                 
Traceback (most recent call last):                                                                                                                                         
  File "<string>", line 2, in <module>                                                                                                                                     
 
 File "/home/atsushi/.config/nvim/plugged/vim-geeknote/plugin/vim_geeknote.py", line 35, in GeeknoteActivateNode                                                          
    explorer.activateNode(vim.current.line)                                                                                                                                
  File "/home/atsushi/.config/nvim/plugged/vim-geeknote/plugin/explorer.py", line 374, in activateNode                                                                     
    node.activate()                                                                                                                                                        
  File "/home/atsushi/.config/nvim/plugged/vim-geeknote/plugin/explorer.py", line 256, in activate                                                                         
    GeeknoteOpenNote(self.note)                                                                                                                                            
  File "/home/atsushi/.config/nvim/plugged/vim-geeknote/plugin/view.py", line 105, in GeeknoteOpenNote                                                                     
    isPrevUsable = GeeknoteIsWindowUsable(prevWin)                                                                                                                         
  File "/home/atsushi/.config/nvim/plugged/vim-geeknote/plugin/view.py", line 218, in GeeknoteIsWindowUsable                                                               
    buftype = getBufferVariable(bnum, 'buftype')                                                                                                                           
  File "/home/atsushi/.config/nvim/plugged/vim-geeknote/plugin/utils.py", line 101, in getBufferVariable                                                                   
    return vim.buffers[bnum].options[var]                                                                                                                                  
  File "/usr/local/lib/python2.7/dist-packages/neovim/api/nvim.py", li                                                                                                     
Press ENTER or type command to continue     

NameError: global name 'Editor' is not defined

First off. Awesome tool! Thanks for the work you put into it.

It would error out while loading a note.
To fix that I had to add :
"from geeknote.editor import Editor" to enml.py

Am using the https://github.com/jeffkowalski/geeknote fork of geeknote.


Error detected while processing function Vim_GeeknoteActivateNode:
line    4:
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "/home/user/dotfiles/_vim/plugged/vim-geeknote/plugin/vim_geeknote.py", line 35, in GeeknoteActivateNode
    explorer.activateNode(vim.current.line)
  File "/home/user/dotfiles/_vim/plugged/vim-geeknote/plugin/explorer.py", line 374, in activateNode
    node.activate()
  File "/home/user/dotfiles/_vim/plugged/vim-geeknote/plugin/explorer.py", line 256, in activate
    GeeknoteOpenNote(self.note)
  File "/home/user/dotfiles/_vim/plugged/vim-geeknote/plugin/view.py", line 120, in GeeknoteOpenNote
    content = ENMLtoText(note.content)
  File "/home/user/dotfiles/_vim/plugged/vim-geeknote/plugin/enml.py", line 34, in ENMLtoText
    return Editor.ENMLtoText(contentENML)
NameError: global name 'Editor' is not defined

ImportError: No module named geeknote.out

Just trying to get this running in my vim, and when I run

vim -c Geeknote, I get:

Error detected while processing function Vim_GeeknoteToggle:
line    4:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/MrMaksimize/.vim_runtime/sources_non_forked/vim-geeknote/plugin/vim_geeknote.py", line 4, in <module>
    from explorer import Explorer
  File "/Users/MrMaksimize/.vim_runtime/sources_non_forked/vim-geeknote/plugin/explorer.py", line 5, in <module>
    from view  import *
  File "/Users/MrMaksimize/.vim_runtime/sources_non_forked/vim-geeknote/plugin/view.py", line 4, in <module>
    from enml  import *
  File "/Users/MrMaksimize/.vim_runtime/sources_non_forked/vim-geeknote/plugin/enml.py", line 5, in <module>
    from geeknote.out import *
ImportError: No module named geeknote.out

I'm terribly bad at python -- would love to know what's going on. Thanks!

Great and SUPER useful project by the way!

FYI - Might want to add a note to README

This really related to OSX, homebrew, python & macvim - not vim-geeknote, but I had not encountered it until using geeknote. Might want to add a note to the README for other users.

On OSX it's common for users to install python using homebrew and set it as the default python interpreter in their shellrc files. Then, if you install geeknote, the libs & geeknote run using that python, not the system python.

When installing macvim, it will use the system's python interpreter by default rather than the homebrew installed python. If you attempt to run a python script that that requires dependencies that were installed to the homebrew python rather than the system python, you just get nasty error messages.

To see if this is the issue, you can run:

vim --version

And if you see:

-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7

Then the problem is the one described above. The fix is to uninstall macvim, then reinstall with the following flags:

brew install macvim --with-lua --override-system-vim

And now vim --version should show:

-I/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/include/python2.7

Then vim-geeknote will run as expected. Also, rad plugin. Thanks!

notebook gets renamed after last note is moved

Steps to reproduce:

  • Create 2 notebooks, for example "unsorted" and "archived"
  • Create notes in unsorted
  • In the navigation window it will say "unsorted (2)"
  • After moving the first note to another notebook, it will say "unsorted (1)", and it does not rename it
  • After moving the last note in "unsorted" it will rename then notebook to "unsorted (1)" literally.

This is nothing major so don't stress it :)

deleting notes?

Is there a way to delete notes? When i delete the line in the navigation buffer and save it, the line just comes back.

How about note name editing inline

Hello, again

I'm using my super vim oneliner

 !geeknote create --title "`cat % | head -n1`" --content "`cat % | tail -n +2`"

as you can see first stroke used as name of note and so you can edit it inline. What about implementing it in vim-geeknote.

p.s. I see only 10 notes in my notebook is it ok?

Removing command feedback?

Upon selecting a note, I get messages like these:

"/tmp/__GeeknoteExplorer__0UhcU4.markdown" 16L, 903C [w]
"/tmp/__GeeknoteExplorer__0UhcU4.markdown" 16L, 903C [w]
Press ENTER or type command to continue

Is there a way to skip showing these so that I don't have to press Enter all the time?

Python error on load.

"/var/folders/wv/96m371n13y31crwjfsmqr6f40000gn/T/__GeeknoteExplorer__YFPKph" 0L, 0C
Error detected while processing function Vim_GeeknoteToggle:
line    4:
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "/Users/giulio/.vim/bundle/vim-geeknote/plugin/vim_geeknote.py", line 177, in GeeknoteToggle
    explorer.show()
  File "/Users/giulio/.vim/bundle/vim-geeknote/plugin/explorer.py", line 774, in show
    self.initView()
  File "/Users/giulio/.vim/bundle/vim-geeknote/plugin/explorer.py", line 560, in initView
    setWindowVariable(wnum, 'winfixwidth', True)
  File "/Users/giulio/.vim/bundle/vim-geeknote/plugin/utils.py", line 95, in setWindowVariable
    vim.windows[wnum-1].options[var] = value
AttributeError: options

geeknote login is fine, I can't figure out where the options attribute comes from :D

Saved note not converted, unwanted 4-spaces indent added

Hello,

thank you for this great Vim plugin :-)

I have an issue with converting/saving the note. Eg. with following text:

test

 ## Test
 line without any indent
     one tab indent

Saved with :GeeknoteSaveAsNote

When I load the note with geeknote or vim-geeknote, I see every line is indented by 4 spaces. In Evernote UI, I see plaintext markdown so it wasn't converted to html.
Additional indenting is added every time I re-save the note with vim-geeknote.

################## TITLE ##################
test
=================== META ==================
Created: 17.01.1970     
Updated: 17.01.1970     
----------------- CONTENT -----------------

    ## Test
    line without any indent
        one tab indent

When I edit the note with geeknote edit in Vim, note is saved correctly without additional indenting.
If I open fixed note in vim-geeknote, save without any changes, 4 spaces are added and therefore document is not converted and saved correctly.

Tested with latest vim-geeknote and geeknote from master branch. No special settings used.


Update

It happens somewhere during:

note.content = textToENML(content)

because when I explicitly call strip() on each line during content string creation, I remove my indents but these are still present.

Solution: Found that saved note is not converted to ENML by default so one has to explicitly define GeeknoteFormat:

let g:GeeknoteFormat="markdown"

otherwise following code is executed and indenting is broken somewhere inside (wrapENML maybe?):

    content = content.replace('<', '&lt;')
    content = content.replace('>', '&gt;')
    content = content.replace('&', '&amp;')
    content = unicode(content, "utf-8")
    contentHTML = u''.join(('<pre>', content, '</pre>')).encode("utf-8")

    enml = Editor.wrapENML(contentHTML)
    return enml

In my opinion GeeknoteFormat should be set to markdown by default, because current vim-default doesn't do what user expects.

Support for stacks

Are there plans to include support for stacks? A group of note books can be bundled together in a stack?

:q Write Loop

Hello, here is a bug I found when vim-geeknote is enabled.
Even if i don't use :GeekNote command, even if I just open any file and may not edit. I catch a unbreakable processing loop after I try to quit(not write) from vim.

p.s. I am not deep in vim log system, where I can find something be helpfull for debug? .viminfo doesn't look like

Cannote create note on Mac.

Just installed plugin and trying to create note by command:
GeeknoteCreateNote AAA
Output:
Error detected while processing function Vim_GeeknoteCreateNote:
line 5:
E11: Invalid in command-line window; executes, CTRL-C quits: 1wincmd w
Traceback (most recent call last):
File "", line 3, in
File "/Users/mobiledeveloper/.spf13-vim-3/.vim/bundle/vim-geeknote/plugin/vim_geeknote.py", line 46, in GeeknoteCreateNote
notebook = explorer.getSelectedNotebook()
File "/Users/mobiledeveloper/.spf13-vim-3/.vim/bundle/vim-geeknote/plugin/explorer.py", line 473, in getSelectedNotebook
setActiveBuffer(self.buffer)
File "/Users/mobiledeveloper/.spf13-vim-3/.vim/bundle/vim-geeknote/plugin/utils.py", line 53, in setActiveBuffer
vim.command('exec {} . "wincmd w"'.format(wnum))
vim.error

Bad things happen when opening a huge notebook

Feil oppdaget under prosessering av function Vim_GeeknoteActivateNode:
linje 4:
Traceback (most recent call last):
File "", line 2, in
File "/home/XXXXXX/.vim/bundle/vim-geeknote/plugin/vim_geeknote.py", line 35, in GeeknoteActivateNode
explorer.activateNode(vim.current.line)
File "/home/XXXXXX/.vim/bundle/vim-geeknote/plugin/explorer.py", line 390, in activateNode
self.render()
File "/home/XXXXXX/.vim/bundle/vim-geeknote/plugin/explorer.py", line 626, in render
node.render(content)
File "/home/XXXXXX/.vim/bundle/vim-geeknote/plugin/explorer.py", line 218, in render
noteNode.render(buffer)
File "/home/XXXXXX/.vim/bundle/vim-geeknote/plugin/explorer.py", line 280, in render
line = '{:<48} n[{}]'.format(line, self.getKey())
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in position 21: ordinal not in range(128)


The notebook in question contains 313 notes.

EDIT: on closer inspection, the character 0xf8 is a norwegian ø i think, so i think this actually might be related to locale settings or something.

Failed to sync back

open a note, add a few lines.
:w to save the file. close the file then run GeeknoteSync
Open Evernote, sync, no updates on the note.
open vim, sync, those few lines disappears.

Plus opening Geeknote in vim is very slow, and freezes the vim.
Nice work though.

Trying to run under Windows 7 64-bit

I didn't see Windows support written anywhere, but I tried nevertheless. Here's my report. It's not really working, judging by these 3 observations:

  • The currently open file is filled (overwritten) with the Geeknote buffer when calling :Geeknote

  • Running :Geeknote produces this error:
    geeknote_error

    After that, gvim hangs for a while, then it either crashes, or in rare cases works as expected. When I run the command again, vim raises other errors (had 2 different ones, can't reproduce the 1st one):

Error detected while processing function Vim_GeeknoteToggle:
line    4:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Freeo\vimfiles\bundle\vim-geeknote\plugin\vim_geeknote.py", line 4, in <module>
    from explorer          import Explorer
  File "C:\Users\Freeo\vimfiles\bundle\vim-geeknote\plugin\explorer.py", line 5, in <module>
    from view  import *
  File "C:\Users\Freeo\vimfiles\bundle\vim-geeknote\plugin\view.py", line 15, in <module>
    noteStore = geeknote.getNoteStore()
  File "C:\Python27\lib\site-packages\geeknote-0.2a-py2.7.egg\geeknote\geeknote.py", line 117, in getNoteStore
    noteStoreUrl = self.getUserStore().getNoteStoreUrl(self.authToken)
  File "C:\Python27\lib\site-packages\geeknote-0.2a-py2.7.egg\geeknote\gclient.py", line 183, in getNoteStoreUrl
    return self.recv_getNoteStoreUrl()
  File "C:\Python27\lib\site-packages\geeknote-0.2a-py2.7.egg\geeknote\gclient.py", line 210, in recv_getNoteStoreUrl
    raise result.systemException
evernote.edam.error.ttypes.EDAMSystemException: EDAMSystemException(errorCode=19, rateLimitDuration=942, _message=None)
  • This popup error is raised as well everytime(!) I close gvim even without running :Geeknote, which is particularly annoying.

Vim 7.4.463 64-bit
Python 2.7.8 64-bit
geeknote 5720fea (Sep 22 12:02:09 2014)

First errors

Hi, great work, but:

Error detected while processing function Vim_GeeknoteCreateNote:
line    5:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/vganzin/.config/.vim/bundle/vim-geeknote/plugin/vim_geeknote.py", line 8, in <module>
    from geeknote.geeknote import *
  File "/usr/lib/python2.7/site-packages/geeknote/geeknote.py", line 18, in <module>
    import config
  File "/usr/lib/python2.7/site-packages/geeknote/config.py", line 23, in <module>
    IS_OUT_TERMINAL = sys.stdout.isatty()
AttributeError: isatty

Geeknote build from aur, vim-geeknote with Vundle

I'm not good in python environment, but can help a bit in coding if there is an open features just for fun

NameError: global name 'createTempFile' is not defined

Error detected while processing function Vim_GeeknoteToggle:
line    4:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/francisco/.vim/plugged/vim-geeknote/plugin/vim_geeknote.py", line 30, in <module>
    explorer = Explorer()
  File "/Users/francisco/.vim/plugged/vim-geeknote/plugin/explorer.py", line 360, in __init__
    self.dataFile = createTempFile(prefix='__GeeknoteExplorer__')
NameError: global name 'createTempFile' is not defined

Loading Geeknote delays any quit

I used Pathogen to install vim-geeknote. Unfortunately, it delays closing vim by ~4s, regardless of whether Geeknote was used in that editing session or not.

With vim-geeknote:

$ time vim -c ":quit"

real    0m4.281s
user    0m0.620s
sys 0m0.179s

Without vim-geeknote:

time vim -c ":quit"

real    0m0.310s
user    0m0.270s
sys 0m0.036s

I tracked the issue down to this line in plugin/vim_geeknote.vim:

autocmd VimLeave * :call Vim_GeeknoteTerminate()

Commenting it out removes the delay, but it looks like it's doing some kind of cleanup for open notes and may be important for correct functioning.

My guess is that this is some kind of overhead for calling out to Python or Geeknote doing a network call any time one of its functions is invoked, because running :Geeknote causes a similar 4-5s pause.

Hyperlinks in notes got erased

When I opened a note using vim-geeknote, all the hyperlinks were not there (including the text). And when I saved the note, and synced, the hyperlinks were gone even on the web/app version.

TypeError: object of type 'NotesMetadataList' has no len()

Hi

After I filled my "Vim" evernote notebook with some more elements, opening that notebook (and only that notebook) in vim-geeknote results in:

Error detected while processing function Vim_GeeknoteActivateNode:
line 4:
Traceback (most recent call last):
File "", line 2, in
File "/home/mbini/.vim/plugin/vim_geeknote.py", line 35, in GeeknoteActivateNode
explorer.activateNode(vim.current.line)
File "/home/mbini/.vim/plugin/explorer.py", line 368, in activateNode
node.activate()
File "/home/mbini/.vim/plugin/explorer.py", line 64, in activate
self.toggle()
File "/home/mbini/.vim/plugin/explorer.py", line 113, in toggle
self.expand()
File "/home/mbini/.vim/plugin/explorer.py", line 165, in expand
notes = self.getNotes()
File "/home/mbini/.vim/plugin/explorer.py", line 178, in getNotes
return GeeknoteGetNotes(searchWords)
File "/home/mbini/.vim/plugin/conn.py", line 40, in GeeknoteGetNotes
count = update_count(count)
File "/home/mbini/.vim/plugin/conn.py", line 33, in
update_count = lambda c: max(c - len(result.notes), 0)
TypeError: object of type 'NotesMetadataList' has no len()

Geeknote command line works correctly on this notebook:

mbini@darkboard:~$ geeknote find --notebooks Vim --count 999
...
242 : 20/11/2014 10:04 SuperTab - Do all your insert-mode completion with Tab! : vim online
243 : 20/11/2014 10:04 List of vim plugins I use - with mini tutorials · mirnazim.org
244 : 20/11/2014 10:05 pyflakes 0.8.1 : Python Package Index
245 : 20/11/2014 10:05 Command-T: About · wincent.com
246 : 20/11/2014 10:06 fugitive.vim - A Git wrapper so awesome, it should be illegal : vim online
247 : 20/11/2014 10:06 taskpaper.vim - TaskPaper to-do list format support : vim online
248 : 20/11/2014 10:07 Solarized - Ethan Schoonover
249 : 20/11/2014 10:07 docunext/closetag.vim
250 : 20/11/2014 10:07 delimitMate.vim - Provides auto-balancing and some expansions for parens, quotes, etc. : vim online
251 : 20/11/2014 10:06 Raimondi/delimitMate
252 : 20/11/2014 10:07 scrooloose/nerdcommenter
253 : 20/11/2014 10:09 CSApprox - Make gvim-only colorschemes work transparently in terminal vim : vim online
254 : 20/11/2014 10:08 Tagbar, the Vim class outline viewer
255 : 20/11/2014 10:19 Better CSS Syntax for Vim - Make CSS more readable. : vim online
256 : 20/11/2014 10:20 Vim is my choice · mirnazim.org
257 : 20/11/2014 10:22 meh/vimmeh
258 : 20/11/2014 10:23 Using VIM as Your Password Manager - Stelfox Athenæum
259 : 20/11/2014 10:23 lunixbochs/actualvim
260 : 20/11/2014 10:23 ghcmod - Happy Haskell programming on Vim, powered by ghc-mod : vim online
261 : 20/11/2014 10:23 Testing Vim plugins with Vimrunner and RSpec - Vim plugins, tips, tricks and tutorials
262 : 20/11/2014 10:24 Building Vim - Vim Tips Wiki
263 : 20/11/2014 10:25 reco - backup and recovery solution for Vim : vim online
264 : 20/11/2014 10:26 vim-easy-align - A powerful, yet easy-to-use Vim alignment plugin : vim online
265 : 20/11/2014 10:27 Introducing my new project - Vide terminal for Vim - Lukáš Zapletal
266 : 20/11/2014 10:28 Cut/copy and paste using visual selection - Vim Tips Wiki
267 : 20/11/2014 10:29 Extracting strings for gettext with Vim - Lukáš Zapletal
268 : 20/11/2014 10:29 Vim use case - fast edit in buffers - Lukáš Zapletal
269 : 20/11/2014 10:29 Vim use case - make and quick fix - Lukáš Zapletal
270 : 20/11/2014 10:29 Reformat vs reindent in Vim - Lukáš Zapletal
271 : 20/11/2014 10:30 Indenting source code - Vim Tips Wiki
272 : 20/11/2014 10:31 Vim documentation: eval
273 : 20/11/2014 10:31 Vim for my grandma (@vcotwdorso) | Twitter

...

I still didn't get wich one of the new notes is causing the problem, but the range is in the 20/11/2014 date . The only information that could be useful is that I have more than 280 notes in that notebook.

attached is a screenshot of gvim while getting troubles

selection_009

Maybe is some note's title got malformed by vim-geeknote?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.