E D R , A S I H C RSS

Vim Setting For Python

Python Programming 을 위한 VIM Setting.

Python extension

Seminar:VimEditor참조.

BicycleRepairMan

Python extension 이 설치된 상태에서 사용 가능하다.

Python extension 을 설치하고 난뒤, BicycleRepairMan 을 install 한다. 그리고 BRM 의 압축화일에 ide-integration/bike.vim 을 VIM 설치 디렉토리에 적절히 복사해준다.

_vimrc 화일에 다음을 추가한다.
~cpp 
let g:bike_exceptions = 1 
let g:bike_progress = 1 
source $VIMRUNTIME/bike.vim 

BRM 의 리팩토링 기능을 이용할때는 리팩토링전 해당 화일을 BRM에 Import 해주어야 한다.

1002's Setting

아직 단축키들은 완벽하게 셋팅하지 않은 상태이긴 하다. 대략 다음의 셋팅을 보면서 조금씩 고쳐나가면 좋을 듯 하다.
~cpp 
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
"source $VIMRUNTIME/mswin.vim
"behave mswin

set diffexpr=MyDiff()
function MyDiff()
  let opt = ''
  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  silent execute '!C:Vimvim62diff -a ' . opt . v:fname_in . ' ' . v:fname_new . ' > ' . v:fname_out
endfunction

syn on
set nonu title 
set ai showmatch hidden incsearch ignorecase smartcase smartindent hlsearch
set et ts=4 sw=4 softtabstop=4 smarttab expandtab
set autowrite
set fileencoding=korea
set foldminlines=3
set nofen
set lines=40
set co=80
set ru
set smd

filetype on
filetype plugin on
filetype indent on

source $VIMRUNTIME/1002/python.vim
source $VIMRUNTIME/1002/python_box.vim
source $VIMRUNTIME/1002/EnhancedCommentify.vim

let g:EnhCommentifyUseAltKeys = "no"
let g:EnhCommentifyPretty = "yes"
let g:bike_exceptions = 1
let g:bike_progress = 1
source $VIMRUNTIME/1002/bike.vim

hi Normal guibg=#FFFFEE

map <F5> :wa <CR> :!python % <CR>
map <F6> :!pythonw.exe "C:Python23Toolsidleidle.pyw"<CR>
map <F11> <C-W>_
map <F3> :call PythonCommentSelection()<CR>
map <F4> :call PythonUncommentSelection()<CR>
map <C-F5> :wa <CR> :!python test_all.py <CR> 

let python_highlight_all = 1
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:28:22
Processing time 0.0274 sec