We have a version of vim from several years ago, which was obtained from the download site as a .tgz and installed in the pre-conda days. We've been happily using this on a daily basis for some time, but recently there has been some more interest in some of the other tools such as Python.
I've now installed all the free packages from the anaconda site via conda, which obviously includes the latest vim.
I've noticed a difference in behaviour of vim between the two packages. The original vim was compiled in 2017:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 7 2017 07:22:47)
Included patches: 1-22
Compiled by PDKUZM@RS12.rocketsoftware.com
Big version without GUI. Features included (+) or not (-):
+acl +cmdline_hist +ebcdic -gettext +listcmds +mouse_sgr +persistent_undo +smartindent +textobjects +wildmenu
-arabic +cmdline_info +emacs_tags -hangul_input +localmap -mouse_sysmouse +postscript +startuptime +timers +windows
+autocmd +comments +eval -iconv -lua +mouse_urxvt +printer +statusline +title +writebackup
-balloon_eval +conceal +ex_extra +insert_expand +menu +mouse_xterm -profile -sun_workshop -toolbar -X11
-browse +cryptv +extra_search +job +mksession -multi_byte -python +syntax +user_commands -xfontset
++builtin_terms +cscope -farsi +jumplist +modify_fname +multi_lang -python3 -tag_binary +vertsplit -xim
+byte_offset +cursorbind +file_in_path +keymap +mouse -mzscheme +quickfix +tag_old_static +virtualedit -xpm
+channel +cursorshape +find_in_path +lambda -mouseshape +netbeans_intg +reltime -tag_any_white +visual -xsmp
+cindent +dialog_con +float +langmap +mouse_dec +num64 -rightleft -tcl +visualextra -xterm_clipboard
-clientserver +diff +folding +libcall -mouse_gpm +packages -ruby +termguicolors +viminfo -xterm_save
-clipboard +digraphs -footer +linebreak -mouse_jsbterm +path_extra +scrollbind +terminfo +vreplace
+cmdline_compl -dnd +fork() +lispindent +mouse_netterm -perl +signs +termresponse +wildignore
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/rsusr/ported/share/vim"
Compilation: c99 -c -I. -Iproto -DHAVE_CONFIG_H -D_ALL_SOURCE -D_EXT -D_UNIX03_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_ISOC99_SOURCE -D_OE_SOCKETS -D_OPEN_MSGQ_EXT -D_OPEN_SY
S -D_OPEN_THREADS -D_POSIX_SOURCE -D_SHARE_EXT_VARS -D_UNIX03_SOURCE -D_UNIX03_WITHDRAWN -D_XOPEN_SOURCE=600 -D_OPEN_SYS_FILE_EXT=1 -O -qlanglvl=extended:extc89:extc99 -qxp
link -qdll -qfloat=ieee -qlongname -qenum=int -qhaltonmsg=3296:4108
Linking: c99 -O -qxplink -qdll -o vim -lm -lcurses
The one just installed:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 18 2020 12:17:08)so it would appear the codebase for vim hasn't changed, though the compile/link options have.
Included patches: 1-22
Compiled by TSPORT@RS12.rocketsoftware.com
Big version without GUI. Features included (+) or not (-):
+acl +cmdline_hist -ebcdic -gettext +listcmds +mouse_sgr +persistent_undo +smartindent +textobjects +wildmenu
+arabic +cmdline_info +emacs_tags -hangul_input +localmap -mouse_sysmouse +postscript +startuptime +timers +windows
+autocmd +comments +eval +iconv -lua +mouse_urxvt +printer +statusline +title +writebackup
-balloon_eval +conceal +ex_extra +insert_expand +menu +mouse_xterm -profile -sun_workshop -toolbar -X11
-browse +cryptv +extra_search -job +mksession +multi_byte -python +syntax +user_commands -xfontset
++builtin_terms +cscope +farsi +jumplist +modify_fname +multi_lang -python3 +tag_binary +vertsplit -xim
+byte_offset +cursorbind +file_in_path +keymap +mouse -mzscheme +quickfix +tag_old_static +virtualedit -xpm
-channel +cursorshape +find_in_path +lambda -mouseshape -netbeans_intg +reltime -tag_any_white +visual -xsmp
+cindent +dialog_con +float +langmap +mouse_dec +num64 +rightleft -tcl +visualextra -xterm_clipboard
-clientserver +diff +folding +libcall -mouse_gpm +packages -ruby +termguicolors +viminfo -xterm_save
-clipboard +digraphs -footer +linebreak -mouse_jsbterm +path_extra +scrollbind +terminfo +vreplace
+cmdline_compl -dnd +fork() +lispindent +mouse_netterm -perl +signs +termresponse +wildignore
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/SERVICE/rocket/envs/lbg-dev/share/vim"
Compilation: xlc_echocmd -c -I. -Iproto -DHAVE_CONFIG_H -D_XOPEN_SOURCE=600 -D_OPEN_SYS_SOCK_IPV6=1 -D_ENHANCED_ASCII_EXT=0xFFFFFFFF -D_OPEN_SYS_FILE_EXT=1 -D_TR1_C99 -I/S
ERVICE/rocket/envs/lbg-dev/include -qdll -qexportall -qascii -q64 -qnocse -qgonum -qasm -qbitfield=signed -qenum=int -qhalton=3296:3304:3950 -qtarget=zosv2r1 -qarch=10 -qtu
ne=12 -O2 -qstrict -qfloat=ieee:nomaf -qlanglvl=extc1x
Linking: xlc_echocmd -q64 -L/SERVICE/rocket/envs/lbg-dev/lib -o vim -lm -ltag -lncurses
Anyway onto the difference. What I'm seeing is that if I use the old vim on untagged files, when saved, they remain in their original format. With the newer vim, untagged files are forced into ISO8859-1; this 'corrupts' anything untagged - for example, if I edit my .profile which is untagged and thus in IBM-1047 and save it with the new vim, it's force converted to ISO8859-1 and then I get errors at login.
Example:
$ touch oldvim.txt
$ touch newvim.txt
$ ls -laT *vim.txt
- untagged T=off -rw-r--r-- 1 XXXXXXX XXXXXXXX 0 Mar 29 09:17 newvim.txt
- untagged T=off -rw-r--r-- 1 XXXXXXX XXXXXXXX 0 Mar 29 09:17 oldvim.txt
$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 7 2017 07:22:47) [etc etc etc]
[vim edit session, adding one line of text and :wq]
"oldvim.txt" 1L, 15C written
$ ls -laT *vim.txt
- untagged T=off -rw-r--r-- 1 XXXXXXX XXXXXXXX 0 Mar 29 09:17 newvim.txt
- untagged T=off -rw-r--r-- 1 XXXXXXX XXXXXXXX 15 Mar 29 09:20 oldvim.txt
[switch to newer vim]
$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 18 2020 12:17:08) [etc etc etc]
[vim edit session, adding one line of text and :wq]
"newvim.txt" 1L, 15C written
$ ls -laT *vim.txt
t ISO8859-1 T=on -rw-r--r-- 1 XXXXXXX XXXXXXXX 15 Mar 29 09:23 newvim.txt
- untagged T=off -rw-r--r-- 1 XXXXXXX XXXXXXXX 15 Mar 29 09:20 oldvim.txt
I have the following environmental variables set both times:
_BPXK_AUTOCVT=ON
_CEE_RUNOPTS='FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)'
Can anyone offer insight as this is not the behaviour I would expect or want?
Many thanks,
Andy.