On Fri, Aug 31, 2012 at 1:27 AM, Chris Jones <cjns1989@gmail.com> wrote:
> On Thu, Aug 30, 2012 at 01:34:10PM EDT, joe M wrote:
>
> [..]
>
>> Anyway, just a heads-up if anyone is interested.
>
> I certainly do. Thanks for bringing this to the list's attention.
>
> Reading through the thread, I'm pretty sure you stated somewhere along
> the line that the behavior you reported occurs when you run 'vim' and
> does not occur when you run 'vi'.
>
> On my (debian) system, vi and vim both point to the same executable.
>
> And here at least, whatever the terminal, both behave the same way in
> this respect, namely that the screen before I invoke vi/vim is not
> restored to its initial state -- that's the way I have set it up to suit
> my requirements.
>
> I find it a little suspicious that the same executable should behave
> differently regarding something that is not clearly related to editing
> itself and differences between vi and vim dure to their different
> capabilities just because you invoke the program in two different ways.
>
> Mind you, there may be a good reason for that, and I am just not aware
> of it.
>
> All the same, assuming you are running your tests on the same system,
> something you may want to check is the full path of the vi and the vim
> executable. So that we know precisely what gets executed.
>
> This should provide the full path:
>
> | % type vim
> | vim is /usr/bin/vim
> | % type vi
> | vi is /usr/bin/vi
>
> You could then use the file command to determine if they point directly
> to a vi/vim executable:
>
> | % file /path/to/vim
> | % file /path/to/vi
>
> If this is the case, you should see something like this:
>
> | /usr/bin/vim: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
>
> If not, you are pointing to a soft link to another file, that may also
> be a soft link.. etc.
>
> | % file /usr/bin/vi
> | /usr/bin/vi: symbolic link to `/etc/alternatives/vi'
>
> In such circumstances, you can determine the 'final' target of your
> commands via the 'readlink command'.
>
> To illustrate, here's what it looks like on my system:
>
> | % type vi
> | vi is /usr/bin/vi
> |
> | % readlink -f /usr/bin/vi
> | /usr/bin/vim.gtk
>
>
> | % type vim
> | vi is /usr/bin/vim
> |
> | % readlink -f /usr/bin/vim
> | /usr/bin/vim.gtk
>
> Thanks,
>
> CJ
>
> --
> WHAT YOU SAY??
>
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
Hello CJ,
Thanks for responding.
On my system, I am building vi and vim differently. In my case, I
think vi is not using the systems' terminfo whereas vim does. Anyway,
I think there is something in rxvt-unicode-256color's terminfo that
affects how the latest vim from the mercurial repo responds/behaves.
Below is my build script for vi and vim
sed -i \
-e 's,/\* #define FEAT_XTERM_SAVE \*/,#define FEAT_XTERM_SAVE,g'\
src/feature.h
echo "CFLAGS: $CFLAGS"
echo "CXXFLAGS: $CXXFLAGS"
echo "LDFLAGS: $LDFLAGS"
./configure --prefix=/usr \
--mandir=/usr/man \
--with-vim-name=vim \
--with-features=huge \
--with-x=yes \
--disable-gui \
--enable-multibyte \
--enable-luainterp \
--enable-perlinterp \
--enable-pythoninterp \
--enable-python3interp=dynamic \
--enable-tclinterp \
--enable-rubyinterp \
--enable-cscope \
--disable-acl \
--disable-sysmouse \
--disable-nls \
--disable-darwin \
--disable-largefile \
--disable-gpm \
--enable-xim \
--enable-fontset \
--enable-xsmp_interact
make VIMRTDIR=
cd src && \
make VIMRTDIR= DESTDIR=$PKG \
installvimbin installruntime installlinks \
&& cd ..
mv $PKG/usr/share/vim/vimrc_example.vim $PKG/usr/share/vim/vimrc
rm -r $PKG/usr/{man/man?/vimtutor*,share/vim/{tutor,macros}}
rm $PKG/usr/share/vim/*/README.txt
ln -sf vim $PKG/usr/bin/evim
ln -sf /bin/vi $PKG/usr/bin/vi
ln -sf vim.1.gz $PKG/usr/man/man1/ex.1.gz
ln -sf vim.1.gz $PKG/usr/man/man1/vi.1.gz
ln -sf vim.1.gz $PKG/usr/man/man1/rvim.1.gz
ln -sf vim.1.gz $PKG/usr/man/man1/view.1.gz
ln -sf vim.1.gz $PKG/usr/man/man1/rview.1.gz
ln -sf vim.1.gz $PKG/usr/man/man1/gvim.1.gz
./configure --prefix=/ \
--datarootdir=/usr/share \
--with-vim-name=vi \
--without-x \
--disable-gui \
--enable-multibyte \
--disable-gpm \
--disable-nls \
--with-features=tiny
make VIMRTDIR=
cd src/ && make VIMRTDIR= DESTDIR=$PKG installvimbin && cd ..
./configure --prefix=/usr \
--with-vim-name=gvim \
--with-x \
--with-features=huge \
--enable-gui=gtk2 \
--enable-multibyte \
--enable-luainterp \
--enable-perlinterp \
--enable-pythoninterp \
--enable-python3interp=dynamic \
--enable-tclinterp \
--enable-rubyinterp \
--enable-cscope \
--enable-gpm \
--enable-xim \
--enable-fontset \
--enable-xsmp_interact \
--disable-darwin \
--disable-largefile \
--disable-acl \
--disable-sysmouse \
--disable-nls
make VIMRTDIR=
cd src && make VIMRTDIR= DESTDIR=$PKG installvimbin && cd ..
install -d $PKG/usr/share/{applications,pixmaps}
my vi and vim executables:
--(/bin)
ls -altr vi
-rwxr-xr-x 1 root root 743704 Aug 30 13:44 vi
--(/bin)
ls -altr /usr/bin/vim
-rwxr-xr-x 1 root root 2228360 Aug 30 13:44 /usr/bin/vim
--(/bin)
/bin/vi --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 30 2012 13:44:25)
Included patches: 1-646
Compiled by root@master
Tiny version without GUI. Features included (+) or not (-):
-arabic -autocmd -balloon_eval -browse +builtin_terms -byte_offset -cindent
-clientserver -clipboard -cmdline_compl -cmdline_hist -cmdline_info -comments
-conceal -cryptv -cscope -cursorbind -cursorshape -dialog -diff -digraphs -dnd
-ebcdic -emacs_tags -eval -ex_extra -extra_search -farsi -file_in_path
-find_in_path -float -folding -footer +fork() -gettext -hangul_input +iconv
-insert_expand -jumplist -keymap -langmap -libcall -linebreak -lispindent
-listcmds -localmap -lua -menu -mksession -modify_fname -mouse -mouse_dec
-mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse -mouse_xterm
-mouse_urxvt -mouse_sgr +multi_byte -multi_lang -mzscheme -netbeans_intg
-path_extra -perl -persistent_undo -printer -profile -python -python3 -quickfix
-reltime -rightleft -ruby -scrollbind -signs -smartindent -sniff -startuptime
-statusline -sun_workshop -syntax -tag_binary -tag_old_static -tag_any_white
-tcl +terminfo -termresponse -textobjects -title -toolbar -user_commands
-vertsplit -virtualedit -visual -viminfo -vreplace +wildignore -wildmenu
-windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard +xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -pipe -ftracer
-fgcse-after-reload -march=core2 -mcx16 -msahf -mpclmul -mpopcnt
-msse4.2 --param l1-cache-size=32 --param l1-cache-line-size=64
--param l2-cache-size=3072 -mtune=generic -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
-Wl,--as-needed -o vi -lm -lncurses -lelf -lnsl -lacl -lattr
-ldl
--(/bin)
/usr/bin/vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 30 2012 13:44:16)
Included patches: 1-646
Compiled by root@master
Huge version without GUI. Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
-dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
+find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv
+insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent
+listcmds +localmap +lua +menu +mksession +modify_fname +mouse -mouseshape
+mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
+mouse_xterm +mouse_urxvt +mouse_sgr +multi_byte +multi_lang -mzscheme
+netbeans_intg +path_extra +perl +persistent_undo +postscript +printer +profile
+python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white +tcl +terminfo +termresponse +textobjects +title
-toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup +X11 +xfontset -xim
+xsmp_interact +xterm_clipboard +xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -pipe -ftracer
-fgcse-after-reload -march=core2 -mcx16 -msahf -mpclmul -mpopcnt
-msse4.2 --param l1-cache-size=32 --param l1-cache-line-size=64
--param l2-cache-size=3072 -mtune=generic -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=1 -I/usr/include -D_LARGEFILE64_SOURCE=1
Linking: gcc -L. -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
-rdynamic -Wl,-export-dynamic -Wl,-E
-Wl,-rpath,/usr/lib/perl5/5.12/linux-thread-multi/CORE -Wl,-O1
-Wl,--hash-style=gnu -Wl,--sort-common -Wl,--as-needed -o vim -lSM
-lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -lncurses -lelf -lnsl
-ldl -L/usr/lib -llua -Wl,-E
-Wl,-rpath,/usr/lib/perl5/5.12/linux-thread-multi/CORE
-fstack-protector -L/usr/lib/perl5/5.12/linux-thread-multi/CORE
-lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
-L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm
-Xlinker -export-dynamic -L/usr/lib -ltcl8.5 -ldl -lieee -lm -Wl,-R
-Wl,/usr/lib -L/usr/lib -lruby -lpthread -lrt -ldl -lcrypt -lm
-L/usr/lib
--(/bin)
Hope the above helps. Please let me know if you need more information.
Thanks,
Joe
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Friday, August 31, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment