python编辑器vim下载_vim做python编辑器

vim使用

tab设定:

set tabstop=4

set softtabstop=4

set shiftwidth=4

other setting:

set number | set nonumber      #set line number

常用命令:http://www.tuxfiles.org/linuxhelp/vimcheat.html

整理自vimtutor

ctr-O                                   #go back

ctr-I                                    #go forward

:s/regex/replace/gic            #substitute on current line. g - replace all. i - ignore case. c - confirm

:1,10s/regex/replace/         #substitute from line 1~10

:%s/regex/replace/             #substitute whole file

:!pwd                                  #execute external command

:w FILENAME                       #write the file to FILENAME

:r FILE                                 #append FILE content at cursor

:r !ls                                    #execute command and append output at cursor

%             #find match ) ] }

10G          #go to line 10

R              #replace mode

yw           #copy a word

y$            #copy until line

v              #visual mode

v->select->:w PART                #save part that is selected

:set xxx            #set some function

:set ic               #ignore case when search

:set noic

/regex\c            #ignore case for this time

:set hls             #highlight search

:set nohls

ctrl+w -> j|k        #jump up or down to another window

:help or F1        #get help

:help w

:help user-manual

word completion using ctrl+D & TAB

:set nocp            #make sure vim is not in compatible

:!l(press ctrl+D or TAB)

:ed(press ctrl+D or TAB)

:help .(press ctrl+D)

vim as python editor

add auto complete in vim for python

download python completion vim script :Python Omni Completion

put in ~/.vim/autoload or /usr/share/vim/addons/autoload

add following 2 line to .vimrc

au Syntax python set omnifunc=pythoncomplete#Complete

au Syntax python set completefunc=pythoncomplete#Complete

use ctrl+x, ctrl+o when writing python program

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值