LMDE 使用笔记 2012-02-03
安装mysql
sudo aptitude install mysql-server-5.1 mysql-client-5.1
开启 sudo /etc/init.d/mysql start
关闭 sudo mysqladmin -u root -pXXXXXX shutdown
安装GIT
安装VIM
安装 PYTHON VIM环境(http://sontek.net/turning-vim-into-a-modern-python-ide)
$ git clone https://github.com/sontek/dotfiles.git
$ cd dotfiles
$ ./install.sh vim
安装VIM 插件 authorinfo
VIMRC
0 "" Tony.Shao VIM Settings$ 
311 let g:vimrc_author='Tony.Shao'-$ 
312 let g:vimrc_email='vector.model@gmail.com'-$ 
313 let g:vimrc_homepage='http://www.xencode.org'$ 
314 $ 
315 " Key mapping$ 
316 nmap <F4> :AuthorInfoDetect<CR>-$ 
317 map <F5> <ESC>:W<CR>:!python %<CR>$ 
318 $ 
319 autocmd BufNewFile *.py 0r ~/.vim/template/pythonconfig.py$
Authorinfo 插件改动,自动为Python文件添加头文件
177 function s:AddHeadInfo()$ 
178 let arrData = [['python','#!/usr/bin/python','# -*- coding: utf-8 -*-']]$ 
179 for [t,p,e] in arrData$ 
180 if g:CheckFileType(t)$ 
181 call setline('.',p)$ 
182 normal o$ 
183 call setline('.',e)$ 
184 normal o$ 
185 break$ 
186 endif$ 
187 endfor$ 
188 call s:TitleDet()$ 
189 endfunction$ 
190 command! -nargs=0 AuthorInfoDetect :call s:AddHeadInfo()$
                    
                
                
            
        
浙公网安备 33010602011771号