MyTetra Share
Делитесь знаниями!
Копирование имени и пути файла
Время создания: 08.09.2016 08:47
Автор: pola
Текстовые метки: vim.scripts.maping
Раздел: Программирование - vim - scripts - maping
Запись: xintrea/mytetra_anatolean/raw/master/base/1473313648tih44vkabn/text.html на bitbucket.org

These mappings are useful for copying the file name to the clipboard.

" Convert slashes to backslashes for Windows.

if has('win32')

nmap ,cs :let @*=substitute(expand("%"), "/", "\\", "g")<CR>

nmap ,cl :let @*=substitute(expand("%:p"), "/", "\\", "g")<CR>

" This will copy the path in 8.3 short format, for DOS and Windows 9x

nmap ,c8 :let @*=substitute(expand("%:p:8"), "/", "\\", "g")<CR>

else

nmap ,cs :let @*=expand("%")<CR>

nmap ,cl :let @*=expand("%:p")<CR>

endif

 
MyTetra Share v.0.59
Яндекс индекс цитирования