Merge branch 'master' of git://github.com/vsviridov/dotvim

This commit is contained in:
Vasili Sviridov
2012-08-10 20:59:10 -07:00
8 changed files with 74 additions and 19 deletions

12
.gitmodules vendored
View File

@@ -10,3 +10,15 @@
[submodule "bundle/snipmate"]
path = bundle/snipmate
url = git://github.com/msanders/snipmate.vim.git
[submodule "bundle/ctrlp.vim"]
path = bundle/ctrlp.vim
url = https://github.com/kien/ctrlp.vim.git
[submodule "bundle/powerline.vim"]
path = bundle/powerline.vim
url = git://github.com/Lokaltog/vim-powerline.git
[submodule "bundle/vimerl"]
path = bundle/vimerl
url = git://github.com/jimenezrick/vimerl.git
[submodule "bundle/hybrid.vim"]
path = bundle/hybrid.vim
url = git://github.com/w0ng/vim-hybrid.git

1
bundle/ctrlp.vim Submodule

Submodule bundle/ctrlp.vim added at 2927ce4eab

1
bundle/hybrid.vim Submodule

Submodule bundle/hybrid.vim added at 1539ae714d

1
bundle/powerline.vim Submodule

Submodule bundle/powerline.vim added at 7f53b5c391

1
bundle/vimerl Submodule

Submodule bundle/vimerl added at e36e0e8d69

BIN
junction.exe Normal file

Binary file not shown.

24
setup.bat Normal file
View File

@@ -0,0 +1,24 @@
@echo off
rem Change to the directory of this script
cd /d %0\..
ver | find "XP" > nul
if %ERRORLEVEL% == 0 goto vXp
goto vOver
:vXp
set target=%UserProfile%\vimfiles
set cmd=junction "%target%" "%cd%"
start /I %cmd%
set cmd=fsutil hardlink create "%UserProfile%\_vimrc" "%cd%\vimrc"
start /I %cmd%
goto done
:vOver
goto done
:done

53
vimrc
View File

@@ -1,19 +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
colorscheme default
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 <leader> before any key remapping
let mapleader = '\'
"Remove search highlight when <Esc> is pressed
nnoremap <silent> <Esc><Esc> <Esc>:nohlsearch<CR><Esc>
"highlight search results
set hlsearch
"No more arrow keys
nnoremap <up> <nop>
@@ -24,16 +39,16 @@ nnoremap <right> <nop>
"inoremap <down> <nop>
"inoremap <left> <nop>
"inoremap <right> <nop>
"move up and down within virtual lines
nnoremap j gj
nnoremap k gk
"press jk in quick succession for esc key
imap jj <Esc>
imap jk <Esc>
"Autoexit to normal mode
if has("autocmd")
au CursorHoldI * stopinsert
au InsertEnter * let updaterestore=&updatetime | set updatetime=15000
au InsertLeave * let &updatetime=updaterestore
endif
set autoread "automatically reload files
if has("gui_running")
set guifont=Lucida\ Console:h10:cRUSSIAN
else
let g:Powerline_symbols = 'fancy'
endif