python的vim设置 [英] vim settings for python

查看:24
本文介绍了python的vim设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下设置文件:

# ~/.vimrc
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set softtabstop=4
set autoindent

如何使这些设置仅适用于python?另外,我将如何添加 python 着色(例如 textmate 为每种语言所做的)?

How would I make these settings apply to python only? Also, how would I add python coloring (such as textmate does for each language) ?

推荐答案

我的配置中有这些行:

filetype plugin indent on
syntax on
au BufNewFile,BufRead *.py set tabstop=4 softtabstop=4 shiftwidth=4 expandtab smarttab autoindent

这可能是您正在寻找的颜色:改进的 Python 语法、黑板配色方案

This may be what you're looking for with the coloring: Improved Python syntax, Blackboard color scheme

这篇关于python的vim设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆