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

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
T
Threatpost
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - Franky
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
M
MIT News - Artificial intelligence
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
云风的 BLOG
云风的 BLOG
S
Security Affairs
P
Proofpoint News Feed
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
S
Security @ Cisco Blogs
H
Hacker News: Front Page
Security Archives - TechRepublic
Security Archives - TechRepublic
Vercel News
Vercel News
Engineering at Meta
Engineering at Meta
Know Your Adversary
Know Your Adversary
Y
Y Combinator Blog
美团技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
月光博客
月光博客
量子位
博客园_首页
The Last Watchdog
The Last Watchdog
D
DataBreaches.Net
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
The Register - Security
The Register - Security
Schneier on Security
Schneier on Security
H
Help Net Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure
C
Cyber Attacks, Cyber Crime and Cyber Security
MyScale Blog
MyScale Blog
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
L
Lohrmann on Cybersecurity
S
Secure Thoughts
Stack Overflow Blog
Stack Overflow Blog
Cloudbric
Cloudbric
Microsoft Security Blog
Microsoft Security 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  "匹配括号高亮的时间(单位是十分之一秒)