From 8a16e7a133d374143ce98f2b6d793d5b070dacf9 Mon Sep 17 00:00:00 2001 From: Vasili Sviridov Date: Fri, 10 Aug 2012 15:15:12 -0700 Subject: [PATCH] Reorganized the vimrc a little --- vimrc | 52 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/vimrc b/vimrc index 4a8cd58..22cb752 100644 --- a/vimrc +++ b/vimrc @@ -1,21 +1,34 @@ call pathogen#infect() -syntax on -set laststatus=2 -"set statusline=%t\ %y\ format:\ %{&ff};\ [%c,%l]\ %{fugitive#statusline()} -set number -set autoindent -set hidden -set encoding=utf-8 -"set t_Co=256 -colorscheme hybrid -if has("autocmd") - autocmd bufwritepost .vimrc source $MYVIMRC -endif +syntax on "enable syntax hightlighting + set nocompatible set modelines=0 set visualbell +set laststatus=2 "show 2 status lines +set number "show line numbers +set autoindent "enable autoindent +set hidden "enable multiple dirty buffers +set encoding=utf-8 "set encoding +set autoread "automatically reload files +colorscheme hybrid + +if has("autocmd") + "Autoexit to normal mode after 15 seconds of inactivity + autocmd CursorHoldI * stopinsert + autocmd InsertEnter * let updaterestore=&updatetime | set updatetime=15000 + autocmd InsertLeave * let &updatetime=updaterestore + "Automatically reload VIMRC file after saving + autocmd bufwritepost .vimrc source $MYVIMRC + autocmd bufwritepost _vimrc source $MYVIMRC +endif +"Set before any key remapping +let mapleader = '\' + +"Remove search highlight when is pressed nnoremap :nohlsearch +"highlight search results +set hlsearch "No more arrow keys nnoremap @@ -26,21 +39,16 @@ nnoremap "inoremap "inoremap "inoremap + +"move up and down within virtual lines nnoremap j gj nnoremap k gk -"press jk in quick succession for esc key -imap jj -"Autoexit to normal mode -if has("autocmd") - au CursorHoldI * stopinsert - au InsertEnter * let updaterestore=&updatetime | set updatetime=15000 - au InsertLeave * let &updatetime=updaterestore -endif +"press jk in quick succession for esc key +imap jk if has("gui_running") + set guifont=Lucida\ Console:h10:cRUSSIAN else let g:Powerline_symbols = 'fancy' endif - -set autoread "automatically reload files