5 changed files with 25 additions and 0 deletions
@ -0,0 +1,19 @@ |
|||||||
|
"-------------------------- |
||||||
|
" Переименование PDF-файлов |
||||||
|
"-------------------------- |
||||||
|
|
||||||
|
function! PdfTags(findstart, base) |
||||||
|
if a:findstart |
||||||
|
return col('.') + 1 |
||||||
|
else |
||||||
|
silent let res = map(systemlist("exiftool -Author -Title " . |
||||||
|
\b:rename_dir . "/" . |
||||||
|
\trim(getline('.')) . |
||||||
|
\" 2>&- | cut -d : -f 2- | tr '\n' ' ' | sed 's/ / - /' "), |
||||||
|
\"'\"' . trim(v:val) . '.pdf\"'") |
||||||
|
return res |
||||||
|
endif |
||||||
|
endfun |
||||||
|
|
||||||
|
setlocal omnifunc=PdfTags |
||||||
|
|
||||||
Loading…
Reference in new issue