(I'm new to Linux and Vim, and I'm trying to learn Vim but I'm having some issues with it that I can't seen do fix)
I'm in a Linux installation (Ubuntu 8.04) that I can't update, using Vim 7.1.138.
My vim installation is in /usr/share/vim/vim71/. /home/user/
My .vimrc file is in /home/user/.vimrc, as follows:
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 is the command syntax on is not working, neither in vim or gvim. And the strange thing is: If I try to set the syntax using the gvim toolbat, it works. Then, in normal mode in gvim, after activating using the toolbar, using the code :syntax off, it works, and just after doing this trying to do :syntax on doesn't work!!
What's going on? Am I missing something?