set nocompatible set et set ai set sw=4 set ts=8 set ruler set si set nu set is set ic set sm set sta syn on set backspace=indent,eol,start set hlsearch set nobackup set nowritebackup set wildmenu set incsearch highlight WhitespaceEOL ctermbg=red guibg=red match WhitespaceEOL /\s\+$/ " 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) set tabstop=4 set expandtab set shiftwidth=4 set tw=79 set wrap set linebreak set nolist set hlsearch " Uncomment the following to have Vim jump to the last position when " reopening a file if has("autocmd") au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif endif " Uncomment the following to have Vim load indentation rules and plugins " according to the detected filetype. if has("autocmd") filetype plugin indent on endif " Diable word wrap for some files autocmd BufNewFile,BufRead *.html set tw=0 autocmd BufNewFile,BufRead *.sh set tw=0 " some commands from vim command! -nargs=* -complete=file Gcheckout :!git checkout % command! -nargs=* -complete=file GDiff :!git diff % command! -nargs=* -complete=file Ar :!sudo /etc/init.d/apache2 restart command! -nargs=* -complete=file Rs :!export SRCPATH=%:p:h && export DESTPATH=${SRCPATH/static_media/static} && /home/`whoami`/webapps/django/mycareerstack/libjs/stylus/bin/stylus % && mv %:r.css $DESTPATH command! -nargs=* -complete=file Cp :!export SRCPATH=%:p:h && export DESTPATH=${SRCPATH/static_media/static} && cp % $DESTPATH " Sort the current paragraph. " Useful for sorting includes, imports, namespaces and other declaration groups. " With this enabled, you can just insert ur statement anywhere and just press ,s nmap ,s {jv}k:sort " make backspace "more powerful" set backspace=indent,eol,start " makes tabs insert "indents" at the beginning of the line set smarttab " toggles paste mode nmap \o :set paste! " toggles line numbers nmap \l :setlocal number! " Clear highlight search nmap \q :nohlsearch nmap ; :buffers:buffer " Buffers nmap :e# nmap :bnext nmap :bprev hi LineTooLong cterm=bold ctermbg=red guibg=LightYellow au FileType make set noet set pastetoggle= autocmd BufRead *.vala set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m autocmd BufRead *.vapi set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m au BufRead,BufNewFile *.vala setfiletype vala au BufRead,BufNewFile *.vapi setfiletype vala " Disable valadoc syntax highlight " "let vala_ignore_valadoc = 1 " " " Enable comment strings let vala_comment_strings = 1 " " " Highlight space errors let vala_space_errors = 1 " " Disable trailing space errors " "let vala_no_trail_space_error = 1 " " Disable space-tab-space errors " let vala_no_tab_space_error = 1 " " " Minimum lines used for comment syncing (default 50) " "let vala_minlines = 120 autocmd BufRead *.py set makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\" autocmd BufRead *.py set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m