Two commands to copy current file's path to system clipboard.
None. Uses pbcopy
on macOS, and xclip
on Linux.
Use <leader>j
and <leader>J
to copy the current file path:
-
<leader>j
— Copies path relative to Git project root- E.g.,
doc/vim-clip-expand-path.txt
- E.g.,
-
<leader>J
— Copies full path, using tilde for user home- E.g.,
~/.vim/pack/DepoXy/start/vim-clip-expand-path/doc/vim-clip-expand-path.txt
- E.g.,
Installation is easy using Vim's packages feature (see :help packages
).
If you want the plugin to load automatically on Vim startup,
use a start/
directory, e.g.,
mkdir -p ~/.vim/pack/landonb/start
And then clone the project to that path:
cd ~/.vim/pack/landonb/start
git clone https://github.com/landonb/vim-clip-expand-path.git
If you want to test the package first, make it optional instead
(see :help pack-add
):
mkdir -p ~/.vim/pack/landonb/opt
cd ~/.vim/pack/landonb/opt
git clone https://github.com/landonb/vim-clip-expand-path.git
" When ready, load the [opt]ional plugin (or is it [opt]-in?).
:packadd! vim-clip-expand-path
To build the help, ensure the plugin is loaded, and then run the following command just one time from within Vim:
:Helptags
Or, you can build the help from the terminal instead. Run:
vim -u NONE -c "helptags vim-clip-expand-path/doc" -c q
And then to view the help from within Vim, run:
:help vim-clip-expand-path
DepoXy Development Environment Orchestrator
https://github.com/DepoXy/depoxy#🍯
vim-clip-expand-path is Copyright (c) 2020-2023 Landon Bouma <depoxy@tallybark.com>
This software is released under the MIT license (see LICENSE
file for more)