惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Help Net Security
MyScale Blog
MyScale Blog
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
Vercel News
Vercel News
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
Last Week in AI
Last Week in AI
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
云风的 BLOG
云风的 BLOG

博客园 - LixingTie

Git添加排除文件规则 [RabbitMQ+Python入门经典] 兔子和兔子窝 Win7强制删除文件 Ubuntu部署HBase Ubuntu部署Zookeeper Ubuntu 12.04 Hadoop自动安装脚本 Ubuntu 12.04下安装Extmail 白话MongoDB(三) 白话MongoDB(二) 白话MongoDB(一) 关于HBase的一些零碎事 Paxos在大型系统中常见的应用场景 某分布式应用实践一致性哈希的一些问题 多IDC的数据分布设计(二) 多IDC的数据分布设计(一) Redis新的存储模式diskstore Redis容量及使用规划 Redis几个认识误区 一致性哈希(Consistent Hashing)
vim配置
LixingTie · 2012-07-07 · via 博客园 - LixingTie

-

在终端 输入以下命令来编辑vimrc配置文件:
sudo vim /etc/vim/vimrc

runtime! debian.vim

"语法高亮
if has(
"syntax")
  syntax on
endif

if filereadable(

"/etc/vim/vimrc.local")
  source /etc/vim/vimrc.local
endif

set nu  

"显示行号

"高亮搜索结果
set hlsearch
set incsearch

set showcmd  

"显示输入命令
set noeb  "去掉输入错误的提示声音"显示中文帮助
if version >= 603
    set helplang=cn
    set encoding=utf-8
endif

autocmd BufNewFile *.py exec ":call SetPyHeader()"

""定义函数SetPyHeader,自动插入Python文件头
func SetPyHeader()
    call setline(1, "\# Author: lixingtie")
    call setline(2, "\# e-mail: 260031207@qq.com")
    call setline(3, "\# create time:: ".strftime("%c"))
    call setline(4, "")
    call setline(5, "\#!/usr/lib/python")
    call setline(6, "\# -*- encoding: utf-8 -*-")
    call setline(7, "")

    "新建文件后,自动定位到文件末尾
    autocmd BufNewFile * normal G
endfunc

set autoread  

"当文件被改动时自动载入
set completeopt=preview,menu "代码补全
set nocompatible 
"不使用vi的键盘模式
set tabstop=4  "Tab键的宽度

"统一缩进为4
set softtabstop=4
set shiftwidth=4


set showmatch  "高亮匹配的括号set matchtime=1  "匹配括号高亮的时间(单位是十分之一秒)