tomtom / autolinker_vim Goto Github PK
View Code? Open in Web Editor NEWAutomatic hyperlinks for any filetype
Home Page: http://www.vim.org/scripts/script.php?script_id=5253
License: GNU General Public License v3.0
Automatic hyperlinks for any filetype
Home Page: http://www.vim.org/scripts/script.php?script_id=5253
License: GNU General Public License v3.0
Glancing around, I am assuming autolinker can perform hypertext links similar to viki and vimwiki for text structures
[[ link ]]
[[ link | text ]]
where link may contain more than one word. I am hoping to use autolinker to replace vimwiki (as I don't need all of its functionality and plethora of keymappings) and prefer to use other markup plugins for highlighting. So.. how can one configure autolinker to provide hypertext links with markup documents (assuming it can)?
If started for a buffer within a directory containg lots of files (for me about 5000) you get an error
E339: Pattern too long
this is because each file gets filled up in (truncated)
AutoHyperlinkWord xxx match /\V\<Page_0000005829\>\|\V\<Table_0000005097\>\|\V\<Table_0000005099\>\|\V\<Page_0005005252\>\|\V\<Page_0000000380\>\|\V\<Page_0000000381\>\|\V\<Page_0000000382\>\|\V\<Page_0000000383\>\|\V\<Page_0000000384\>\|\V\<Page_0000000385\>\|\V\<Page_0000000386\>\|\V\<Page_0000000387\>\|\V\<Page_0000000388\>\|\V\<Page_0000000389\>\|\V\<Table_0099000758\>\|\V\<Codeunit_0000005340\>\|\V\<Codeunit_0000005341\>\|\V
....
Maybe limiting the files to 256 or so:
function! s:Globpath(path, pattern) abort "{{{3
Tlibtrace 'autolinker', a:path, a:pattern
let id = join([getcwd(), a:path, a:pattern], '|')
if s:IsValidCache(id)
let matches = g:autolinker_glob_cache[id].files
else
let matches = s:DoGlobPath(a:path, a:pattern)
let matches = map(matches, 'fnamemodify(v:val, ":p")')
let matches = tlib#list#Uniq(matches)
let g:autolinker_glob_cache[id] = {'files': matches}
endif
return matches[0:255]
endf
is a solution
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.