No digraphs available in vim - vim

I can't get digraphs to work in vim.
When I type:
:digraphs
it gives me an error message: E196: No digraphs in this version.
Do I need to install any plugins or packages? If I type:
:scriptnames
it doesn't seem to return i.e. just seems to block.
I am using vim 8.2.587 in Fedora 30, running as a guest inside Virtual Box.
When using vim 8.2.158 running on a native Fedora 31 machine, the digraphs work fine.
Update:
vi --version | grep digraph
shows that vim was built with digraph support. The full output is below.
> vi --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 17 2020 05:09:15)
Included patches: 1-587
Modified by <bugzilla#redhat.com>
Compiled by <bugzilla#redhat.com>
Small version without GUI. Features included (+) or not (-):
+acl -farsi +mouse_sgr -tag_old_static
-arabic -file_in_path -mouse_sysmouse -tag_any_white
+autocmd -find_in_path -mouse_urxvt -tcl
-autochdir -float +mouse_xterm -termguicolors
-autoservername -folding +multi_byte -terminal
-balloon_eval -footer -multi_lang +terminfo
-balloon_eval_term +fork() -mzscheme +termresponse
-browse -gettext -netbeans_intg -textobjects
+builtin_terms -hangul_input +num64 -textprop
-byte_offset +iconv -packages -timers
-channel +insert_expand -path_extra -title
-cindent -ipv6 -perl -toolbar
-clientserver -job -persistent_undo +user_commands
-clipboard +jumplist -popupwin -vartabs
+cmdline_compl -keymap -printer +vertsplit
+cmdline_hist -lambda -profile +virtualedit
-cmdline_info -langmap -python +visual
+comments -libcall -python3 +visualextra
-conceal -linebreak -quickfix -viminfo
-cryptv -lispindent -reltime +vreplace
-cscope +listcmds -rightleft +wildignore
+cursorbind +localmap -ruby -wildmenu
-cursorshape -lua +scrollbind +windows
-dialog -menu -signs +writebackup
-diff -mksession -smartindent -X11
-digraphs +modify_fname -sound -xfontset
-dnd +mouse -spell -xim
-ebcdic -mouseshape -startuptime -xpm
-emacs_tags -mouse_dec -statusline -xsmp
-eval -mouse_gpm -sun_workshop -xterm_clipboard
+ex_extra -mouse_jsbterm -syntax -xterm_save
-extra_search -mouse_netterm +tag_binary
system vimrc file: "/etc/virc"
user vimrc file: "$HOME/.virc"
2nd user vimrc file: "~/.vim/virc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/etc"
f-b for $VIMRUNTIME: "/usr/share/vim/vim82"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -Wl,--as-needed -o vim -lm -lselinux -lncurses -lacl -lattr -ldl

Small version without GUI and -digraphs speak a clear language here. Many Linux distributions just ship with a minimal, stripped-down version of Vim to provide vi compatibility. If you want to use the full Vim capabilities, you typically can install a separate package (usually named vim, or vim-full vs. the default vim-tiny). And that would then be invoked as vim, not vi.

Related

YouCompleteMe unavailable: unable to load Python

I use Linux CentOS-7-x86_64 and am trying to install YouCompleteMe with vundle. I get the error:
YouCompleteMe unavailable: unable to load Python.
however, when I type vim --version I get:
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 13 2020 22:48:56)
Included patches: 1-577
Compiled by louqinjian#localhost.localdomain
Huge version without GUI. Features included (+) or not (-):
+acl -farsi +mouse_sgr +tag_binary
+arabic +file_in_path -mouse_sysmouse -tag_old_static
+autocmd +find_in_path +mouse_urxvt -tag_any_white
+autochdir +float +mouse_xterm -tcl
-autoservername +folding +multi_byte +termguicolors
-balloon_eval -footer +multi_lang +terminal
+balloon_eval_term +fork() -mzscheme +terminfo
-browse +gettext +netbeans_intg +termresponse
++builtin_terms -hangul_input +num64 +textobjects
+byte_offset +iconv +packages +textprop
+channel +insert_expand +path_extra +timers
+cindent +ipv6 +perl +title
-clientserver +job +persistent_undo -toolbar
-clipboard +jumplist +popupwin +user_commands
+cmdline_compl +keymap +postscript +vartabs
+cmdline_hist +lambda +printer +vertsplit
+cmdline_info +langmap +profile +virtualedit
+comments +libcall +python/dyn +visual
+conceal +linebreak +python3/dyn +visualextra
+cryptv +lispindent +quickfix +viminfo
+cscope +listcmds +reltime +vreplace
+cursorbind +localmap +rightleft +wildignore
+cursorshape +lua +ruby +wildmenu
+dialog_con +menu +scrollbind +windows
+diff +mksession +signs +writebackup
+digraphs +modify_fname +smartindent -X11
-dnd +mouse -sound -xfontset
-ebcdic -mouseshape +spell -xim
+emacs_tags +mouse_dec +startuptime -xpm
+eval -mouse_gpm +statusline -xsmp
+ex_extra -mouse_jsbterm -sun_workshop -xterm_clipboard
+extra_search +mouse_netterm +syntax -xterm_save
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: "/usr/local/share/vim"
Compilation: gcc -std=gnu99 -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -std=gnu99 -L. -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE -L/usr/local/lib -Wl,--as-needed -o vim -lm -ltinfo -lselinux -ldl -L/usr/lib -llua -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE -fstack-protector -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -lruby -lpthread -lrt -ldl -lcrypt -lm
And, when I install vim with .configure, I include
--with-features=huge --enable-python3interp --enable-pythoninterp
What can I do to solve this?
I suggest you go to your ~/.vimrc and add this at the beginning of the file BEFORE you begin your Plug declarations.
if has('python3')
endif
Example of ~/.vimrc:
if has('python3')
endif
call plug#begin('~/.vim/plugged')
Plug 'https://github.com/ycm-core/YouCompleteMe.git'
call plug#end
From there you can
:PlugInstall
it and then cd into your YouCompleteMe directory.
If you have Anaconda installed make sure you DON'T install it with it.
Use your /usr/bin python instead.
Example:
/usr/bin/python3 install.py --all
Finally, once it's all set and done reboot your computer and open up Vim again.
I installed YouCompleteMe using https://github.com/junegunn/vim-plug but as long as you have that 'if' statement in your vimrc it should work.
Maybe it's because your VIM is using python 2.* as default python version. From 2020, YouCompleteMe dropped support for python 2.
:python import sys; print(sys.version)
Run this command inside your vim to see which version of python are in used.
remove the configuration of python2:
--enable-pythoninterp,(remove this words)
because YouCompleteMe dropped support for python2.
recompile as the instruments here. everything works fine.
(many thanks to the man who shared his solution)
./configure --with-features=huge
--enable-multibyte
--enable-gtk3-check
--enable-rubyinterp=yes
--with-python3-command=python3.7
--enable-python3interp=yes
--enable-perlinterp=yes
--enable-luainterp=yes
--enable-cscope
see more details here: https://github.com/ycm-core/YouCompleteMe/issues/3635

vim crashes in directory with *.py files

When I try opening vim from the command line in a specific directory, it crashes with this message:
vim
Vim: Caught deadly signal ABRT
Vim: Finished.
Aborted (core dumped)
After that, my terminal seems to translate mouse movements/clicks as input. For example clicking on various places on the screen will produce various characters on my prompt, and so will scrolling.
The terminal is still useable though.
Since it's only happening when I'm currently in that directory, I strongly suspect that it has something to do with the contents of that directory. I am able to open each file using vim from the command line when I am in a different directory.
This is what the directory contains:
ls -a
. error.py __init__.py libmiyamoto.pyc Movie.py param.py pyfits.py thermodyn.py
.. fortranfile.py io.py libqt.py mpi.py phot.py pyramses units.py
cooling.py fourier.py libdisk.py libutil.py observations.py plummer.py rec.py
cosmo.py geometry.py libgrid.py main.py palette.py profiles.py SSP
ctes.py ic.py libmiyamoto.py Mkgmov.py parameters.py __pycache__ talkgdisp.py
How can I get vim to work properly in this directory?
If it's of any use, I'm working on Ubuntu 18.04 on gnome-terminal 3.28.2 and the following vim version:
$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 10 2018 21:31:58)
Included patches: 1-1453
Modified by pkg-vim-maintainers#lists.alioth.debian.org
Compiled by pkg-vim-maintainers#lists.alioth.debian.org
Huge version with GTK3 GUI. Features included (+) or not (-):
+acl +farsi +mouse_sgr -tag_any_white
+arabic +file_in_path -mouse_sysmouse +tcl
+autocmd +find_in_path +mouse_urxvt +termguicolors
-autoservername +float +mouse_xterm +terminal
+balloon_eval +folding +multi_byte +terminfo
+balloon_eval_term -footer +multi_lang +termresponse
+browse +fork() -mzscheme +textobjects
++builtin_terms +gettext +netbeans_intg +timers
+byte_offset -hangul_input +num64 +title
+channel +iconv +packages +toolbar
+cindent +insert_expand +path_extra +user_commands
+clientserver +job +perl +vertsplit
+clipboard +jumplist +persistent_undo +virtualedit
+cmdline_compl +keymap +postscript +visual
+cmdline_hist +lambda +printer +visualextra
+cmdline_info +langmap +profile +viminfo
+comments +libcall -python +vreplace
+conceal +linebreak +python3 +wildignore
+cryptv +lispindent +quickfix +wildmenu
+cscope +listcmds +reltime +windows
+cursorbind +localmap +rightleft +writebackup
+cursorshape +lua -ruby +X11
+dialog_con_gui +menu +scrollbind -xfontset
+diff +mksession +signs +xim
+digraphs +modify_fname +smartindent +xpm
+dnd +mouse +startuptime +xsmp_interact
-ebcdic +mouseshape +statusline +xterm_clipboard
+emacs_tags +mouse_dec -sun_workshop -xterm_save
+eval +mouse_gpm +syntax
+ex_extra -mouse_jsbterm +tag_binary
+extra_search +mouse_netterm +tag_old_static
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -g -O2 -fdebug-prefix-map=/build/vim-NQEcoP/vim-8.0.1453=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-E -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib -llua5.2 -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.26/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm
You can capture a full log of a Vim session with vim -V20vimlog. After Vim crashes, examine the vimlog log file, especially the final commands.
Launching plain Vim with the factory-defaults lets you check whether a plugin is the culprit (which I would suspect, as you use a stable Vim version provided by Ubuntu):
$ vim -N -u NONE -i NONE
$ vim --clean # Alternative for Vim 8+
For plugin problems: Often, a binary search where you disable half of your plugins, then only one half of that (when the problem is still there), or the other half (when the problem vanished) lets you get to the problematic script quickly. If you use a package manager or the now built-in pack plugins, the disabling is really simple. The same can be done with the configuration in your ~/.vimrc (by commenting out blocks).

Emacs-like syntax highlighting in Vim

I am originally an Emacs user and decided to give Vim a try, but I really don't like Vim's default very dark syntax colouring and really miss the colors of my old Emacs.
The only thing that I found to get Emacs' colours in Vim was that link:
http://www.vim.org/scripts/script.php?script_id=63
I downloaded the file in my ~/.vim/colors and used the command :colorscheme emacs to activate it, but the result was very far from Emacs' colors and really close to Vim's default theme.
And anyways, in the script description they say themselves that they did not go too far in copying Emacs' colors.
Does anybody know something really efficient for doing that, something that goes really far, tweaking everything possible to import Emacs' colours in vim ?
(Or maybe am I doing something wrong with the script that I already downloaded ?)
Edit:
I'm running GNU Emacs 24.4.1, console mode, under Ubuntu 14.04. I mainly edit C and C++ files and never ever modified anything about Emacs' colour scheme.
I am also using that version of Vim (output of vim --version):
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 9 2014 17:36:39)
Included patches: 1-488
Modified by pkg-vim-maintainers#lists.alioth.debian.org
Compiled by buildd#
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float +mouse_urxvt -tag_any_white
-browse +folding +mouse_xterm +tcl
++builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+cindent +gettext -mzscheme +textobjects
-clientserver -hangul_input +netbeans_intg +title
-clipboard +iconv +path_extra -toolbar
+cmdline_compl +insert_expand +perl +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak +python +viminfo
+cscope +lispindent -python3 +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con +lua +rightleft +windows
+diff +menu +ruby +writebackup
+digraphs +mksession +scrollbind -X11
-dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent -xim
+emacs_tags -mouseshape -sniff -xsmp
+eval +mouse_dec +startuptime -xterm_clipboard
+ex_extra +mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop -xpm
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/usr/include/tcl8.6 -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_LARGEFILE64_SOURCE=1
Linking: gcc -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -L/build/buildd/ruby2.1-2.1.2/debian/lib -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib -llua5.2 -Wl,-E -fstack-protector -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.20/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lieee -lm -lruby-2.1 -lpthread -lgmp -ldl -lcrypt -lm

vim puts extra space for every accented character

Whenever I type an accented character in vim, like for example: é it places an extra space like so é<space>.
Small gif animation that illustrates the problem: Link here. Notice that in the screen recording I am at no point pressing the space bar and yet they appear.
It's the exact same problem as described in this SO question and in Super user question too, but the solution proposed for both - set encoding=utf-8 - is not working for me. I've placed that in both the .vimrc and in a running session and none worked.
In MacVim, which set encoding? also outputs encoding=utf-8, this issue doesn't happen.
I installed vim with brew, here's the info command of it:
vim: stable 7.4.488, HEAD
http://www.vim.org/
Conflicts with: ex-vi
/usr/local/Cellar/vim/7.4.488 (1600 files, 26M) *
Built from source with: --override-system-vi
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/vim.rb
==> Dependencies
Optional: lua ✔, luajit ✔
==> Options
--disable-nls
Build vim without National Language Support (translated messages, keymaps)
--override-system-vi
Override system vi
--with-client-server
Enable client/server mode
--with-lua
Build vim with lua support
--with-luajit
Build with luajit support
--with-mzscheme
Build vim with mzscheme support
--with-python3
Build vim with python3 instead of python[2] support
--with-tcl
Build vim with tcl support
--without-perl
Build vim without perl support
--without-python
Build vim without python support
--without-ruby
Build vim without ruby support
--HEAD
Install HEAD version
And :version info here:
:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 5 2015 21:44:59)
MacOS X (unix) version
Included patches: 1-258
Compiled by Homebrew
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +cmdline_info +emacs_tags -gettext +lua +mouse_urxvt +profile +statusline +transparency -X11
+arabic +comments +eval -hangul_input +menu +mouse_xterm +python -sun_workshop +user_commands -xfontset
+autocmd +conceal +ex_extra +iconv +mksession +multi_byte -python3 +syntax +vertsplit +xim
+balloon_eval +cryptv +extra_search +insert_expand +modify_fname +multi_lang +quickfix +tag_binary +virtualedit -xsmp
+browse +cscope +farsi +jumplist +mouse -mzscheme +reltime +tag_old_static +visual -xterm_clipboard
++builtin_terms +cursorbind +file_in_path +keymap +mouseshape +netbeans_intg +rightleft -tag_any_white +visualextra -xterm_save
+byte_offset +cursorshape +find_in_path +langmap +mouse_dec +odbeditor +ruby +tcl +viminfo -xpm
+cindent +dialog_con_gui +float +libcall -mouse_gpm +path_extra +scrollbind +terminfo +vreplace
+clientserver +diff +folding +linebreak -mouse_jsbterm +perl +signs +termresponse +wildignore
+clipboard +digraphs -footer +lispindent +mouse_netterm +persistent_undo +smartindent +textobjects +wildmenu
+cmdline_compl +dnd +fork() +listcmds +mouse_sgr +postscript -sniff +title +windows
+cmdline_hist -ebcdic +fullscreen +localmap -mouse_sysmouse +printer +startuptime +toolbar +writebackup
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Ve
rsions/2.7/include/python2.7 -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7 -fno-strict-aliasing -fno-common -dynamic -I/usr/local/inclu
de -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/System/Library/Frameworks/Tcl.framework/Headers -D
_REENTRANT=1 -D_THREAD_SAFE=1 -D_DARWIN_C_SOURCE=1
Linking: clang -L. -L/usr/local/lib -L. -L/usr/local/lib -L/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -lpython2.7 -framework Core
Foundation -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lm -lncurses -liconv -framework Cocoa -pagezero_size 10000 -image_base 100000000 -L/usr/local/lib -llu
ajit-5.1 -fstack-protector -L/usr/local/lib -L/System/Library/Perl/5.16/darwin-thread-multi-2level/CORE -lperl -framework Python -F/System/Library/Frameworks -framework Tcl -frame
work CoreFoundation -framework Ruby
And my locale:
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
Any ideas? Thanks.
None of the suggestions of the comments worked for me, so I kept on digging on the issue myself. In the end it was just a matter of unchecking an iTerm setting.

C programs in vim 7.3

At college we are writing some C code. I am used to vim 7.4, but I can't install it there because I don't have sudo privileges. I can't even save a vimrc on a computer because they delete all files after restart.
So my question is: how do you go about programming with these obstacles, do you carry your vimrc with you?
One more thing that bugs me is that 7.3 doesn't support cindent and filetype on; so I am left with only autoindent. My version output:
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Feb 10 2013 06:43:40)
Included patches: 1-547
Modified by pkg-vim-maintainers#lists.alioth.debian.org
Compiled by buildd#
Small 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 +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 -visualextra -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 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -DTINY_VIMRC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-z,relro -Wl,--as-needed -o vim -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lselinux -lacl -lattr
So when I write code it tends to look like this:
int main()
{
int whatever;
return 0;
}
Pressing c-d really feels like a waste of time. Anybody has any suggestions, maybe implementing some commands in the vimrc which I could carry around I guess?
That build is totally unfit for programming. Here are the most immediately obvious missing features:
-autocmd -cindent -clipboard -cmdline_compl -comments -cscope -diff
-eval -ex_extra -extra_search -file_in_path -find_in_path -float -folding
-gettext -insert_expand -modify_fname -lua -path_extra -perl -persistent_undo
-python -python3 -quickfix -reltime -ruby -signs -smartindent -statusline -syntax
-tag_binary -tag_old_static -tag_any_white -tcl -textobjects -user_commands
-vertsplit -virtualedit -visualextra -viminfo -vreplace -wildmenu
You have two options:
build a proper Vim locally, all contained in a specific directory and copy that directory onto a USB stick so that you can put it back every day. Put your ~/.vim/ on that USB stick too for the same reason.
explain to your professor/IT department/whatever that you can't really be expected to use that Vim for programming.

Resources