Windows setup batch file
Added a tool to create junction points, so that the vim folder can be symlinked to profile directory
This commit is contained in:
BIN
junction.exe
Normal file
BIN
junction.exe
Normal file
Binary file not shown.
24
setup.bat
Normal file
24
setup.bat
Normal 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
|
||||||
89
vimrc
89
vimrc
@@ -1,43 +1,46 @@
|
|||||||
call pathogen#infect()
|
call pathogen#infect()
|
||||||
syntax on
|
syntax on
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
"set statusline=%t\ %y\ format:\ %{&ff};\ [%c,%l]\ %{fugitive#statusline()}
|
"set statusline=%t\ %y\ format:\ %{&ff};\ [%c,%l]\ %{fugitive#statusline()}
|
||||||
set number
|
set number
|
||||||
set autoindent
|
set autoindent
|
||||||
set hidden
|
set hidden
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
"set t_Co=256
|
"set t_Co=256
|
||||||
colorscheme hybrid
|
colorscheme hybrid
|
||||||
if has("autocmd")
|
if has("autocmd")
|
||||||
autocmd bufwritepost .vimrc source $MYVIMRC
|
autocmd bufwritepost .vimrc source $MYVIMRC
|
||||||
endif
|
endif
|
||||||
set nocompatible
|
set nocompatible
|
||||||
set modelines=0
|
set modelines=0
|
||||||
set visualbell
|
set visualbell
|
||||||
|
|
||||||
nnoremap <silent> <Esc><Esc> <Esc>:nohlsearch<CR><Esc>
|
nnoremap <silent> <Esc><Esc> <Esc>:nohlsearch<CR><Esc>
|
||||||
|
|
||||||
"No more arrow keys
|
"No more arrow keys
|
||||||
nnoremap <up> <nop>
|
nnoremap <up> <nop>
|
||||||
nnoremap <down> <nop>
|
nnoremap <down> <nop>
|
||||||
nnoremap <left> <nop>
|
nnoremap <left> <nop>
|
||||||
nnoremap <right> <nop>
|
nnoremap <right> <nop>
|
||||||
"inoremap <up> <nop>
|
"inoremap <up> <nop>
|
||||||
"inoremap <down> <nop>
|
"inoremap <down> <nop>
|
||||||
"inoremap <left> <nop>
|
"inoremap <left> <nop>
|
||||||
"inoremap <right> <nop>
|
"inoremap <right> <nop>
|
||||||
nnoremap j gj
|
nnoremap j gj
|
||||||
nnoremap k gk
|
nnoremap k gk
|
||||||
"press jk in quick succession for esc key
|
"press jk in quick succession for esc key
|
||||||
imap jj <Esc>
|
imap jj <Esc>
|
||||||
|
|
||||||
"Autoexit to normal mode
|
"Autoexit to normal mode
|
||||||
if has("autocmd")
|
if has("autocmd")
|
||||||
au CursorHoldI * stopinsert
|
au CursorHoldI * stopinsert
|
||||||
au InsertEnter * let updaterestore=&updatetime | set updatetime=15000
|
au InsertEnter * let updaterestore=&updatetime | set updatetime=15000
|
||||||
au InsertLeave * let &updatetime=updaterestore
|
au InsertLeave * let &updatetime=updaterestore
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:Powerline_symbols = 'fancy'
|
if has("gui_running")
|
||||||
|
else
|
||||||
set autoread "automatically reload files
|
let g:Powerline_symbols = 'fancy'
|
||||||
|
endif
|
||||||
|
|
||||||
|
set autoread "automatically reload files
|
||||||
|
|||||||
Reference in New Issue
Block a user