(I am new to Linux and Vim, and I'm trying to learn Vim, but I have some problems with it that I have not seen, I fix it)
I am in a Linux installation (Ubuntu 8.04) which I cannot update using Vim 7.1.138.
My vim installation is located in /usr/share/vim/vim71/ ./Main/user/
My .vimrc file is located in /home/user/.vimrc , as shown below:
fun! MySys() return "linux" endfun set runtimepath=~/.vim,$VIMRUTNTIME source ~/.vim/.vimrc
And then, in my /home/user/.vim/.vimrc :
" =============== GENERAL CONFIG ============== set nocompatible syntax on " =============== ENCODING AND FILE TYPES ===== set encoding=utf8 set ffs=unix,dos,mac " =============== INDENTING =================== set ai " Automatically set the indent of a new line (local to buffer) set si " smartindent (local to buffer) " =============== FONT ======================== " Set font according to system if MySys() == "mac" set gfn=Bitstream\ Vera\ Sans\ Mono:h13 set shell=/bin/bash elseif MySys() == "windows" set gfn=Bitstream\ Vera\ Sans\ Mono:h10 elseif MySys() == "linux" set gfn=Inconsolata\ 14 set shell=/bin/bash endif " =============== COLORS ====================== colorscheme molokai " ============== PLUGINS ====================== " -------------- NERDTree --------------------- :noremap ,n :NERDTreeToggle<CR> " =============== DIRECTORIES ================= set backupdir=~/.backup/vim set directory=~/.swap/vim
... fact - the syntax on command does not work, neither in vim nor in gvim. And strange: if I try to set the syntax using gvim toolbat, it works . Then, in normal mode in gvim, after activation using the toolbar, using the code :syntax off , it works, and only after that try to do :syntax on does not work !!
I have syntax files in /usr/share/vim/vim71/ as well as in home folders (there is only a python syntax module in the house). I also ran sudo aptitude install vim and didn't download anything, EXCEPT vim-gtk , as I was afraid of some kind of incompatibility.
What's happening? Did I miss something?