Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use sort or delete. vim.error: Vim: E492: Not an editor command: ListPads #86

Open
gzagatti opened this issue Jan 29, 2016 · 6 comments

Comments

@gzagatti
Copy link

Hi @fmoralesc, this is a great addtion to vim but I'm having trouble making full use of the pugin.

When I attempt to sort by date or delete I get the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/gzagatti/.vim/bundle/vim-pad/pythonx/vim_pad/list_local.py", line 35, in delete_pad
    vim.command("ListPads")
vim.error: Vim:E492: Not an editor command: ListPads

I'm not sure if there might be something wrong with my installation of the plugin or vim. The function ListPads does indeed exists under autoload/pad.vim, but the python program does not seem to be able to find it.

This is my version of vim:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 20 2016 09:07:10)
MacOS X (unix) version
Included patches: 1-1090
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         -gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        -mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -Os -w -pipe -march=native -mmacosx-version-min=10.11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /usr/bin/clang   -L. -L/usr/local/lib -L/usr/local/lib -Wl,-headerpad_max_install_names -o vim        -lm  -lncurses -liconv -framework Cocoa   -fstack-protector  -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -framework Python   -lruby.2.0.0 -lobjc
@fmoralesc
Copy link
Owner

It seems the version you are using is old (there is no vim-pad/pythonx/vim_pad/list_local.py file anymore, which is where that error is coming from, and :ListPads is also obsolete). I suggest you delete the plugin folder and reinstall it from the version here at github.

@gzagatti
Copy link
Author

gzagatti commented Feb 1, 2016

I was indeed using the wrong version of vim-pad. The reason was that I installed the plugin via Vundle, and I sourced the plugin from vim-scripts/vim-pad, which hosts the obsolete version of your plugin.

When I sourced directly from your account fmoralesc/vim-pad, I also faced problems with the plugin. But that's because the git HEAD points to devel branch which is not fully operational. Once I changed to the master branch the whole plugin was operational.

I would suggest, that you leave the git HEAD of the project in the master branch such that sourcing with Vundle becomes easier, since Vundle does not allow one to choose the branch of the project.

@fmoralesc
Copy link
Owner

@gzagatti Actually, the devel branch is recommended (master only tracks the releases), so I would like to know what issues you had with it.

@gzagatti
Copy link
Author

gzagatti commented Feb 1, 2016

@fmoralesc I reverted to the devel branch and I faced issues with the search function.

When I switched from ack to ag, the search became more effective instead of failing to find matches I was able to find the notes I was expecting. Thus I'm not sure whether my version of ack. Anyway, I'm happy to use ag, which is faster.

My second issue was with the sort by tag function. The function would break at line 215 of the module pad.list. After some investigation, I realized that the function was breaking at that point, because when the view_files vector is constructed, it splits the vim.current.buffer object in the white spaces. If a filename has a space, then it chops the full path where the first blank shows up. One alternative is to split each element of vim.current.buffer by the @, since this symbol separates the filename from the dates. However, if a filename has the @ then the same problem is bound to occur. Thus, it would be advisable to capture the file path in another way. But I'm not sure how the vim.current.buffer is constructed.

Second, incremental search does not work with quotes. If I attempt to place a quote I get the following error message:

Error detected while processing :
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/gzagatti/.vim/bundle/vim-pad/pythonx/pad/list.py", line 192, in incremental_search
    V + ('echo ">> ' + info + query + '"')
  File "/Users/gzagatti/.vim/bundle/vim-pad/pythonx/pad/vim_interface.py", line 24, in __add__
    vim.command(cmd)
vim.error: Vim(echo):E114: Missing quote: "

I hope this help.

@fmoralesc
Copy link
Owner

Thanks for the info. Both seem to be escaping issues, I'll see what I can do once I have more time, hopefully this week.

The ack issue might be because of some change in its interface, or because of the place it is installed. Those are difficult for me to be aware of, because I don't use that backend so it is bound to be a bit outdated...

@gzagatti
Copy link
Author

gzagatti commented Feb 1, 2016

That sounds great. I'm looking forward to the improvements. I'm quite a beginner in this world (still grappling with git and vim), but if there's anyway I can help with this plugin please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants