ijanos /.vimrc

set nocompatible
syntax on
set nu
set hlsearch
set wmnu
"set smartindent
set tabstop=4
set sw=4
set smarttab
set expandtab
set softtabstop=4


" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
"set background=dark

" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
"  au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
"    \| exe "normal g'\"" | endif
"endif

" Uncomment the following to have Vim load indentation rules according to the
" detected filetype. Per default Debian Vim only load filetype specific
" plugins.
"if has("autocmd")
"  filetype indent on
"endif

" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
set showcmd		" Show (partial) command in status line.
set showmatch		" Show matching brackets.
set ignorecase		" Do case insensitive matching
set smartcase		" Do smart case matching
"set incsearch		" Incremental search
"set autowrite		" Automatically save before commands like :next and :make
"set hidden             " Hide buffers when they are abandoned
"set mouse=a		" Enable mouse usage (all modes) in terminals
" Source a global configuration file if available

"set statusline=[%02n]\ %f\ %(\[%M%R%H]%)%=\ %4l,%02c%2V\ %P%*
"set statusline=%F%m%r%h%w\ [%{&ff}]\ [%Y]\ [#\%03.3b]\ [0x\%02.2B]\ [%03l,%03v][%p%%]\ [%L]
"set statusline=%F%m%r%h%w\ [%{&ff}]\ [%Y]\ %=%4l,%02v[%p%%][%L]
if has("statusline")

"	 set statusline=%<%f\ %h%m%r%=%{\"[\".(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\ &bomb)?\",B\":\"\").\"]\ \"}%k\ %-14.(%l,%c%V%)\ %P
	set statusline=%F%m%r%h%w\ [%{&ff}:%{(&fenc==\"\"?&enc:&fenc)}]%y\ %=[%l,%v][%L][%p%%]
	"set statusline=%F%m%r%h%w\ (%{&ff})%{(&fenc==\"\"?&enc:&fenc)}.{%Y}[%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}

 endif
set laststatus=2
"---------------
" keybinds
"---------------
" Make tab in v mode work like I think it should (keep highlighting):
vmap <tab> >gv
vmap <s-tab> <gv
" Select all.
map <c-a> ggVG
" Use arrow keys to work as they would in notepad :)
map <Up> gk
map <Down> gj
" Change buffers easily
map <M-Left> :bprevious<CR>
map <M-Right> :bnext<CR>

set tags+=$HOME/.vim/tags/python.ctags
autocmd FileType python set omnifunc=pythoncomplete#Complete
" omnicomplete with Ctrl-space
inoremap <Nul> <C-x><C-o>

let Tlist_WinWidth = 46
map <F3> :Tlist<CR>
map <F4> :nohl<CR>

python << EOF
import os
import sys
import vim
for p in sys.path:
    if os.path.isdir(p):
        vim.command(r"set path+=%s" % (p.replace(" ", r"\ ")))
EOF