vim config
Vim\vim74\lang
-> Vim\vim74\lang1
set nocompatible
set encoding=utf8
set guioptions-=T
set number
set guifont=consolas:h12
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
filetype off
filetype plugin indent on
syntax on
" set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=C:\Users\zWX856567\.vim\bundle\Vundle.vim
call vundle#begin()
Plugin 'easymotion/vim-easymotion'
Plugin 'python-mode/python-mode'
call vundle#end()
filetype plugin indent on
nmap s <Plug>(easymotion-s)
set tabstop=4
set softtabstop=4
set shiftwidth=4
set shiftround
set expandtab
set nobackup
set noswapfile
set nowritebackup
set ignorecase
set smartcase
"set cursorline
set foldmethod=manual
set langmenu=en_US
let $LANG = 'en_US'
set scrolloff=5
set wildmenu
"nmap <F5> :w!<CR>:!python %<CR>
"nmap <F1> :w!<CR>:!wscript %<CR>
"nmap <F4> :w!<CR>:!g++ %<CR>:!a.exe<CR>
map <Enter> o<ESC>
map <S-Enter> O<ESC>
let py_version = system('python -V 2>&1 | grep -Po " (?<=Python )[2|3] " ' )
if py_version == 2
python pass
elseif py_version == 3
python3 pass
else
python pass
endif
autocmd BufNewFile *.py 0put ="#!/usr/bin/python\<nl>\# coding: utf-8\<nl>\ \<nl>\ \<nl>\def main():\<nl> pass\<nl>\ \<nl>\ \<nl>\if __name__ == '__main__':\<nl>\ main()\<nl>"|$
autocmd filetype python nnoremap <F5> :w! <bar> exec '!python '.shellescape('%')<CR>
autocmd filetype vb nnoremap <F5> :w! <bar> exec '!wscript '.shellescape('%')<CR>
autocmd filetype perl nnoremap <F5> :w! <bar> exec '!perl '.shellescape('%')<CR>
"autocmd filetype c nnoremap <F5> :w! <bar> exec '!gcc -std=c11 '.shellescape('%').' -o '.shellescape('%:r').' && '.shellescape('%:r')<CR>
autocmd filetype c nnoremap <F5> :w! <bar> exec '!clc '.shellescape('%')<CR>
autocmd filetype cpp nnoremap <F5> :w! <bar> exec '!clcpp '.shellescape('%')<CR>
autocmd filetype java nnoremap <F5> :w!<CR> :!javac %<CR> :!java %:r<CR>
filetype plugin on
let g:pydiction_location = 'D:\Vim\vim73e\pydiction\complete-dict'
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
function HeaderPython()
call setline(1, "#!/usr/bin/env python")
call setline(2, "# -*- coding: utf-8 -*-")
call setline(3, "# author: otfsenter")
normal G
normal o
endf
autocmd bufnewfile *.py call HeaderPython()
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction
todo list
https://github.com/jkramer/vim-checkbox