tomtom / autolinker_vim

Automatic hyperlinks for any filetype
http://www.vim.org/scripts/script.php?script_id=5253
GNU General Public License v3.0
3 stars 0 forks source link

:Autolinkbuffer not existend, gz-mapping not there #1

Closed Garonenur closed 8 years ago

Garonenur commented 8 years ago

Hi, I tried to use this plugin for todo.txt files, as the notes added to tasks there are linked with file://.

I checked with git grep, because :Autolinkbuffer was unknown to vim, and the only appearance of that command is in documentation files, but nowhere else? Also, the mappings for autolinker are unknown to vim, even though g:autolinker#nmap is set to gz Do you need any more information?

Garonenur commented 8 years ago

okay, I dug around a little in the code and found the command :Albuffer which does the trick to activate autolinker for a buffer - but the auto detection for todo.txt-files does not work for now. (I could work around this by calling :Albuffer in after/ftplugin/ttodo.vim, or adding that filetype to the list).

tomtom commented 8 years ago

If the autolink plugin is loaded, Autolink should be automatically be enabled forbuffers with filetype ttodo. You might want to check the output of :autocmd AutoLinker BufWinEnter and :echo g:autolinker_filetypes if this actually is the case.

Garonenur commented 8 years ago

this seems right: g:autolinker_filetypes ['text', 'txt', 'todo', 'ttodo', 'todotxt', 'md', 'markdown', 'markdown.pandoc', 'tex', 'latex'] but autocmd AutoLinker BufWinEnter gives: E216: No such group or event: AutoLinker BufWinEnter

Garonenur commented 8 years ago

as always: thanks for the fast response and fix! It seems to work, but I get an error message:

Error detected while processing function autolinker#EnableBuffer..tlib#list#Uniq:
line   12:
E713: Cannot use empty key for Dictionary
E713: Cannot use empty key for Dictionary

is this related to the fix?

tomtom commented 8 years ago

is this related to the fix?

Please update tlib.

Garonenur commented 8 years ago

ah. should always update that one with the others. thanks again. I really should get to learn more vimscript, so I can send you fixes instead of issues ;)