sponsor Vim development Vim logo Vim Book Ad

complete_filename_keepenv : complete filename without expanding envrionment variables

 script karma  Rating 16/4, Downloaded by 397  Comments, bugs, improvements  Vim wiki

created by
jinhu lu
 
script type
utility
 
description
Complete filename without expanding envrionment variables,

Usually  in insert mode ,  filename-completion will auto expand  env variables, like this
        $HOME/<C-X><C-F>   --->     /home/user/abc

This script let you  do not touch the env  vars  while  completion .  
        $HOME/<C-F>     ---> $HOME/abc

Support env format :  $ENV,  ${ENV} ,  $(ENV),   $env(VAR) (tcl only)
Support searching system env with prefix, e.g.: $H<C-F>

Usage:  
        1) Insert mode: <C-F>
        2) Insert mode: <C-X><C-U>

Note: Just tested under Linux (Centos6, Ubuntu20.04),  other OS may  not work~
 
install details
Drag this file into vim plugin directory. ( ~/.vim/plugin/ )
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
complete_file_keepenv.vim 0.6 2021-09-27 7.0 jinhu lu fix env pattern bug in tcl file
complete_file_keepenv.vim 0.5 2020-12-28 7.0 jinhu lu 1) add home symbol '~' supported
2) exclude base start with '-/'
3) fix a bug on vim8
complete_file_keepenv.vim 0.4 2020-12-02 7.0 jinhu lu 1) exclude base start with '[{}()-]'
2) remove compatibility with <C-X><C-F>
complete_file_keepenv.vim 0.3 2020-12-02 7.0 jinhu lu fixed base len error when start at middle line
complete_file_keepenv.vim 0.1 2020-11-22 7.0 jinhu lu Initial upload
ip used for rating: 3.143.4.181

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github