Skip to content

aileot/vim-symlink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-symlink

Another implementation to resolve symbolic link paths, using :file instead of :edit.

Features

Install

Install with lazy.nvim:

{ "aileot/vim-symlink" }

Install with packer:

use({ "aileot/vim-symlink" })

Install with vim-plug:

Plug 'aileot/vim-symlink'

Options

b:symlink_should_resolve_path

(default: 1)
A buffer-local option. If it is set to 0 or v:false (or set vim.b.symlink_should_resolve_path to false in nvim), path for the buffer will not be resolved. This option is expected to be set on BufReadPre.

Potential Issues

Due to the :file redirection, you could get confused in some autocmd events:

  • The values of autocmd-pattern, <amatch>, and <afile>, to a symbolic link would be either the symbolic link itself or its resolved path.

  • The buffer names (by bufname(), or nvim_buf_get_name() in nvim) might be different from what you expect to the path as well.

Please consider applying resolve() to <amatch> or <afile> as needed.

Acknowledgment

Implementation on :file has been discussed in tpope/vim-fugitive#147.

Alternative

About

Another implementation to resolve symbolic links automatically

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published